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

Re: [Debconf-devel] Bug#381619: debconf 1.5.3 breaks apache install

clone 381619 -1
reassign -1 apache
retitle -1 apache: does evil things with IFS in postinst

On Sat, Aug 05, 2006 at 03:39:58PM -0700, dean gaudet wrote:
> Package: debconf
> Version: 1.5.3
> apache-1.3.34-2 package can't be configured when debconf 1.5.3 is on the 
> box... works fine when 1.5.2 is on the box...
> tail of set -x output looks like so:
> + db_set apache/server-name arctic.org
> + _db_cmd 'SET apache/server-name' arctic.org
> + printf '%s\n' 'SET apache/server-namearctic.org'
> + IFS='
> '
> + read -r _db_internal_line
> + RET='10 apache/server-namearctic.org doesn'\''t exist'
> + case ${_db_internal_line%%[   ]*} in
> + return 10
> everything is fine if i revert the echo/printf change from #306134.

While I acknowledge that it's the debconf change that broke this, I
think apache is doing cruel and unusual things to the shell and has at
best a dubious right to expect things to keep on working. It does this
in three places:

  export IFS=`printf '\x07'`

... and never sets IFS back to a more normal value.

The only way I can see of avoiding this in debconf while still avoiding
echo's undesirable behaviour is to do something like this:

  IFS=' '
  printf '%s\n' "$*" >&3
  # Set to newline to get whole line.
' read -r _db_internal_line

What do you think?

Colin Watson                                       [cjwatson@debian.org]

Reply to: