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

Bug#300990: marked as done (xfonts-scalable : postinst fails on serial console where COLUMNS is null)



Your message dated Wed, 14 Feb 2007 23:35:42 +0100
with message-id <45D38EBE.6060707@ens-lyon.org>
and subject line Bug#300990: xfonts-scalable : postinst fails on serial console where COLUMNS is null
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xfonts-scalable
Version: 4.3.0.dfsg.1-10
Severity: normal

/var/lib/dpkg/info/xfonts-scalable.postinst sets DEFCOLUMNS (the
default value of COLUMNS) using this code:

DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true
if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then
  DEFCOLUMNS=80
fi

If "stty size" outputs "0 0", the expr conditional leaves DEFCOLUMNS=0,
which leads to this error message:

	fmt: invalid width: `0'

There are various workarounds, like exporting COLUMNS or using stty to
set the window size or using the resize command from the xutils
package or running apt-get in an xterm window instead of on a serial
console (the window size settings reported by stty are zero on a
serial console, at least they are zero on my serial consoles).

I do have COLUMNS=80 in my serial consoles, but only as a bash
variable (bash doesn't seem to export it by default).

Perhaps that expr command (or another one following it) should also
make sure DEFCOLUMNS as generated by stty is nonzero.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages xfonts-scalable depends on:
ii  xutils                   4.3.0.dfsg.1-10 X Window System utility programs

-- no debconf information


--- End Message ---
--- Begin Message ---
Closing since passing -w 0 to fmt seems to be fine in Etch.

Brice


--- End Message ---

Reply to: