[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#592048: cdebconf: unable to display "${something}"

Package: cdebconf
Version: unable to display "${something}"
Severity: minor
Tags: d-i

I'm writing a tool to modify the u-boot environment on certain devices.
At a point, I'm showing the user the changes to make to his environment.
Such changes usually contains the "${mtdparts}" string, that triggers an
assertion error in cdebconf when displayed.

I have made several tests:
1°) db_subst uboot-installer/apply_changes CHANGES "$$" shows "$$",
2°) db_subst uboot-installer/apply_changes CHANGES "\${mtdparts}" aborts
3°) db_subst uboot-installer/apply_changes CHANGES "$\{mtdparts}" shows
"$\{mtdparts}", which is not what I want

Reading the source code, I finally came to the conclusion that cdebconf expands
"${...}" no matter what, and wants it to be a directive.
Reading the doc, I've found that a non-implemented directive does nothing and
is replaced by an empty string, so, here is my ugly hack that works:

db_subst uboot-installer/apply_changes CHANGES "$${!}{mtdparts}"

This feels a bit wrong, and I think there should be a better way to do that.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (120, 'unstable'), (105, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-rc3+ (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cdebconf depends on:
ii  debconf                       1.5.33     Debian configuration management sy
ii  libc6                         2.11.2-2   Embedded GNU C Library: Shared lib
ii  libdebian-installer4          0.74       Library of common debian-installer
ii  libnewt0.52                   0.52.11-1  Not Erik's Windowing Toolkit - tex
ii  libslang2                     2.2.2-4    The S-Lang programming library - r
pn  libtextwrap1                  <none>     (no description available)

cdebconf recommends no packages.

Versions of packages cdebconf suggests:
pn  cdebconf-gtk                  <none>     (no description available)

Reply to: