Debian Bug report logs - #300990
xfonts-scalable : postinst fails on serial console where COLUMNS is null

version graph

Package: xfonts-scalable; Maintainer for xfonts-scalable is Debian X Strike Force <debian-x@lists.debian.org>; Source for xfonts-scalable is src:xfonts-scalable.

Reported by: Eirik Fuller <eirik@hackrat.com>

Date: Wed, 23 Mar 2005 03:18:03 UTC

Severity: normal

Found in version 4.3.0.dfsg.1-10

Done: Brice Goglin <Brice.Goglin@ens-lyon.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Eirik Fuller <eirik@hackrat.com>, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#300990; Package xfonts-scalable. Full text and rfc822 format available.

Acknowledgement sent to Eirik Fuller <eirik@hackrat.com>:
New Bug report received and forwarded. Copy sent to Eirik Fuller <eirik@hackrat.com>, Debian X Strike Force <debian-x@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Eirik Fuller <eirik@hackrat.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xfonts-scalable: postinst barfs on zero width
Date: Tue, 22 Mar 2005 19:13:45 -0800 (PST)
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



Changed Bug title. Request was from browaeys.alban@wanadoo.fr to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Brice Goglin <Brice.Goglin@ens-lyon.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Eirik Fuller <eirik@hackrat.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #12 received at 300990-done@bugs.debian.org (full text, mbox):

From: Brice Goglin <Brice.Goglin@ens-lyon.org>
To: 300990-done@bugs.debian.org
Subject: Bug#300990: xfonts-scalable : postinst fails on serial console where COLUMNS is null
Date: Wed, 14 Feb 2007 23:35:42 +0100
Closing since passing -w 0 to fmt seems to be fine in Etch.

Brice




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 19 Jun 2007 00:40:17 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 00:37:42 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.