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

Bug#191669: marked as done (xserver-xfree86: _POSIX2_VERSION=200112 upgrade failure (+ patch))



Your message dated Thu, 29 May 2003 01:31:56 +0200
with message-id <20030528233156.GA26232@lina.inka.de>
and subject line oops
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)

--------------------------------------
Received: (at submit) by bugs.debian.org; 2 May 2003 17:40:32 +0000
>From eggert@twinsun.com Fri May 02 12:40:31 2003
Return-path: <eggert@twinsun.com>
Received: from alcor.twinsun.com [198.147.65.9] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 19BeWM-00016k-00; Fri, 02 May 2003 12:40:30 -0500
Received: from green.twinsun.com ([192.54.239.71])
	by alcor.twinsun.com (8.12.6/8.12.6) with ESMTP id h42HePYZ027360
	for <submit@bugs.debian.org>; Fri, 2 May 2003 10:40:25 -0700 (PDT)
Received: from shade.twinsun.com (shade.twinsun.com [192.54.239.27])
	by green.twinsun.com (8.11.7+Sun/8.11.7) with SMTP id h42HeO500978
	for <submit@bugs.debian.org>; Fri, 2 May 2003 10:40:24 -0700 (PDT)
Received: from ken.twinsun.com ([192.54.239.7])
 by shade.twinsun.com (SAVSMTP 3.1.0.29) with SMTP id M2003050210402402223
 for <submit@bugs.debian.org>; Fri, 02 May 2003 10:40:24 -0700
Received: from arte (eggert@arte.twinsun.com [192.54.239.5])
	by ken.twinsun.com (8.12.9+Sun/8.12.9) with SMTP id h42HeOqt002042
	for <submit@bugs.debian.org>; Fri, 2 May 2003 10:40:24 -0700 (PDT)
Message-Id: <[🔎] 200305021740.h42HeOqt002042@ken.twinsun.com>
Received: by arte (sSMTP sendmail emulation); Fri,  2 May 2003 10:40:24 -0700
From: "Paul Eggert" <eggert@twinsun.com>
Date: Fri,  2 May 2003 10:40:24 -0700
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xserver-xfree86: _POSIX2_VERSION=200112 upgrade failure (+ patch)
X-Debbugs-CC: Paul Eggert <eggert@twinsun.com>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-8.1 required=4.0
	tests=BAYES_01,HAS_PACKAGE,MSG_ID_ADDED_BY_MTA_2,X_DEBBUGS_CC
	version=2.53-bugs.debian.org_2003_04_23
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_04_23 (1.174.2.15-2003-03-30-exp)

Package: xserver-xfree86
Version: 4.2.1-6
Severity: normal

I have _POSIX2_VERSION=200112 set in my environment; this causes some
GNU utilities (notably coreutils 5.0) to conform to the new POSIX
standard rather than the old one.  The new standard disallows
obsolescent usages like "head -1"; you're supposed to use "head -n 1"
instead.  Setting this variable caused "dselect" to fail when
attempting to upgrade to xserver-xfree86 4.2.1-6, with the following
symptoms.  I enclose a patch at the end of this message.

To reproduce the problem, set _POSIX2_VERSION=200112 in your environment
and then attempt to upgrade to 4.2.1-6.

	...
	Preconfiguring packages ...
	head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	...
	Installing new version of config file /etc/X11/rstart/rstartd.real ...

	Setting up xfonts-100dpi (4.2.1-6) ...
	Running update-fonts-dir in 100dpi font directory...head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	done.
	Running update-fonts-alias in 100dpi font directory...done.

	Setting up xfonts-75dpi (4.2.1-6) ...
	Running update-fonts-dir in 75dpi font directory...head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	done.
	Running update-fonts-alias in 75dpi font directory...done.

	Setting up xfonts-base (4.2.1-6) ...
	Running update-fonts-dir in misc font directory...head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	done.
	Running update-fonts-alias in misc font directory...done.

	Setting up xfonts-scalable (4.2.1-6) ...
	Running update-fonts-scale in Speedo font directory...tail: +2: No such file or directory
	done.
	Running update-fonts-dir in Speedo font directory...head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	done.
	Running xftcache in Speedo font directory...done.
	Running update-fonts-scale in Type1 font directory...tail: +2: No such file or directory
	tail: +2: No such file or directory
	done.
	Running update-fonts-dir in Type1 font directory.../usr/bin/X11/mkfontdir: bad format for /usr/lib/X11/fonts/Type1/fonts.scale file
	/usr/bin/X11/mkfontdir: failed to create directory in /usr/lib/X11/fonts/Type1
	head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	done.
	Running xftcache in Type1 font directory...done.

	Setting up xserver-common (4.2.1-6) ...
	head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	tail: +2: No such file or directory
	dpkg: error processing xserver-common (--configure):
	 subprocess post-installation script returned error exit status 1
	dpkg: dependency problems prevent configuration of xserver-xfree86:
	 xserver-xfree86 depends on xserver-common (>= 4.1.0-10); however:
	  Package xserver-common is not configured yet.
	dpkg: error processing xserver-xfree86 (--configure):
	 dependency problems - leaving unconfigured
	Setting up xterm (4.2.1-6) ...
	Installing new version of config file /etc/X11/app-defaults/XTerm-color ...

	Setting up g++-3.2 (3.2.3-0pre9) ...
	Setting up libstdc++5-dev (3.2.3-0pre9) ...
	Setting up g++ (3.2.3-1) ...

	Errors were encountered while processing:
	 xserver-common
	 xserver-xfree86
	E: Sub-process /usr/bin/dpkg returned an error code (1)
	Some errors occurred while unpacking. I'm going to configure the
	packages that were installed. This may result in duplicate errors
	or errors caused by missing dependencies. This is OK, only the errors
	above this message are important. Please fix them and run [I]nstall again
	Press enter to continue.
	Setting up g++ (3.2.3-1) ...

	Errors were encountered while processing:
	 xserver-common
	 xserver-xfree86
	E: Sub-process /usr/bin/dpkg returned an error code (1)
	Some errors occurred while unpacking. I'm going to configure the
	packages that were installed. This may result in duplicate errors
	or errors caused by missing dependencies. This is OK, only the errors
	above this message are important. Please fix them and run [I]nstall again
	Press enter to continue.

	Setting up xserver-common (4.2.1-6) ...
	head: `-1' option is obsolete; use `-n 1'
	Try `head --help' for more information.
	tail: +2: No such file or directory
	dpkg: error processing xserver-common (--configure):
	 subprocess post-installation script returned error exit status 1
	dpkg: dependency problems prevent configuration of xserver-xfree86:
	 xserver-xfree86 depends on xserver-common (>= 4.1.0-10); however:
	  Package xserver-common is not configured yet.
	dpkg: error processing xserver-xfree86 (--configure):
	 dependency problems - leaving unconfigured
	Errors were encountered while processing:
	 xserver-common
	 xserver-xfree86

	installation script returned error exit status 100.
	Press <enter> to continue.


Here is a proposed patch.  I haven't tested it -- it's done only by
inspecting the code looking for problematic uses like "head -1".

diff -pru debian/local/update-fonts-dir debian-fix/local/update-fonts-dir
--- debian/local/update-fonts-dir	2003-05-01 17:00:00.000000000 -0700
+++ debian-fix/local/update-fonts-dir	2003-05-02 10:23:30.000000000 -0700
@@ -56,7 +56,7 @@ while [ -n "$1" ]; do
       /usr/bin/X11/mkfontdir $XDIR
     fi
     # are there any fonts in the font dir?
-    if [ "$(head -1 $XDIR/fonts.dir)" = "0" ]; then
+    if [ "$(head -n 1 $XDIR/fonts.dir)" = "0" ]; then
       rm -f $XDIR/fonts.dir $XDIR/encodings.dir
       # remove the font dir if it is empty
       rmdir $XDIR > /dev/null 2>&1 || true
diff -pru debian/local/update-fonts-scale debian-fix/local/update-fonts-scale
--- debian/local/update-fonts-scale	2003-05-01 17:00:00.000000000 -0700
+++ debian-fix/local/update-fonts-scale	2003-05-02 10:23:29.000000000 -0700
@@ -56,7 +56,7 @@ while [ -n "$1" ]; do
     if [ "$(echo $ETCDIR/*.scale)" != "$ETCDIR/*.scale" ]; then
       for file in $ETCDIR/*.scale; do
         # omit count at top of file
-        tail +2 $file >> $XDIR/fonts.scale.update-tmp
+        tail -n +2 $file >> $XDIR/fonts.scale.update-tmp
       done
       # write new scale file in case we are interrupted
       # write new count to top of file
diff -pru debian/rules debian-fix/rules
--- debian/rules	2003-05-01 17:00:00.000000000 -0700
+++ debian-fix/rules	2003-05-02 10:23:28.000000000 -0700
@@ -43,7 +43,7 @@ export GROFF_NO_SGR=1
 HTML2TEXT=html2text -nobs -style pretty
 
 # Get package version info.
-SOURCE_VERSION:=$(shell head -1 debian/changelog | cut -d\( -f2 | cut -d\) -f1)
+SOURCE_VERSION:=$(shell head -n 1 debian/changelog | cut -d\( -f2 | cut -d\) -f1)
 
 # Get builder info.
 BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2> /dev/null))}})
@@ -272,7 +272,7 @@ ifndef test_rules
 	# confirm that the installed file list has not changed
 	if [ -e debian/MANIFEST.$(ARCH) ]; then \
 	  if ! cmp -s debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; then \
-	    diff -u -0 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; \
+	    diff -U 0 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; \
 	    if [ -n "$$IGNORE_MANIFEST_CHANGES" ]; then \
 	      echo 'MANIFEST check failed; ignoring problem because \$$IGNORE_MANIFEST_CHANGES set' >&2; \
 	      echo 'Please ensure that the package maintainer has an up-to-date version of the' >&2; \
diff -pru debian/xserver-common.postinst.in debian-fix/xserver-common.postinst.in
--- debian/xserver-common.postinst.in	2003-05-01 17:00:00.000000000 -0700
+++ debian-fix/xserver-common.postinst.in	2003-05-02 10:23:27.000000000 -0700
@@ -59,13 +59,13 @@ EOF
        egrep -q '^### END DEBCONF SECTION' $CONFIGFILE; then
       # see if the beginning of the file was left alone; sed cannot backtrack in an
       # address range
-      if ! head -1 $CONFIGFILE | egrep -q '^### BEGIN DEBCONF SECTION'; then
+      if ! head -n 1 $CONFIGFILE | egrep -q '^### BEGIN DEBCONF SECTION'; then
         # sick, sick, sick
         LINES=$(sed -n '1,/^### BEGIN DEBCONF SECTION/p' < $CONFIGFILE | wc -l)
         sed -n 1,$(( $LINES - 1 ))p < $CONFIGFILE > $WORKTMP
       fi
       cat $DEBCONFTMP >> $WORKTMP
-      sed -n '/^### END DEBCONF SECTION/,$p' < $CONFIGFILE | tail +2 >> $WORKTMP
+      sed -n '/^### END DEBCONF SECTION/,$p' < $CONFIGFILE | tail -n +2 >> $WORKTMP
     else
       message "Existing $CONFIGFILE has missing or half-open debconf region;" \
               "not writing X server wrapper configuration file."
diff -pru debian/xserver-xfree86.config.in debian-fix/xserver-xfree86.config.in
--- debian/xserver-xfree86.config.in	2003-05-01 17:00:00.000000000 -0700
+++ debian-fix/xserver-xfree86.config.in	2003-05-02 10:23:24.000000000 -0700
@@ -565,7 +565,7 @@ if [ "$ARCH" = "powerpc" -o "$MULTIHEAD"
   fi
   if which lspci > /dev/null 2>&1; then
     # try to guess the correct BusID
-    VIDEO_CARD=$(LC_ALL=C lspci -n | grep "Class 0300:" | head -1 | cut -d\  -f1)
+    VIDEO_CARD=$(LC_ALL=C lspci -n | grep "Class 0300:" | head -n 1 | cut -d\  -f1)
     if [ -n "$VIDEO_CARD" ]; then
       # we now have an entry in "hex:hex.hex" format, need "PCI:decimal:decimal:decimal"
       BUS=$(printf "%d" 0x$(echo $VIDEO_CARD | cut -d: -f1) )
@@ -678,8 +678,8 @@ if [ -z "$RECONFIGURE" ]; then
       set -e
       if [ -n "$MDETECT_OUTPUT" ]; then
         PRIORITY=low
-        AUTODETECTED_PORT=$(echo "$MDETECT_OUTPUT" | head -1)
-        AUTODETECTED_PROTOCOL=$(echo "$MDETECT_OUTPUT" | tail -1)
+        AUTODETECTED_PORT=$(echo "$MDETECT_OUTPUT" | head -n 1)
+        AUTODETECTED_PROTOCOL=$(echo "$MDETECT_OUTPUT" | tail -n 1)
         debug_echo "mdetect returned port \"$AUTODETECTED_PORT\"; protocol \"$AUTODETECTED_PROTOCOL\""
         if [ -n "$AUTODETECTED_PORT" ]; then
           # /dev/input/mouse* means we autodetected a USB pointer; we will

---------------------------------------
Received: (at 191669-done) by bugs.debian.org; 28 May 2003 23:32:01 +0000
>From ecki@lina.inka.de Wed May 28 18:32:00 2003
Return-path: <ecki@lina.inka.de>
Received: from quechua.inka.de (mail.inka.de) [193.197.184.2] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19LAOm-00007m-00; Wed, 28 May 2003 18:32:00 -0500
Received: from calista.inka.de (p508b23fd.dip.t-dialin.net [80.139.35.253])
	by mail.inka.de with asmtp 
	id 19LAOk-0005W9-00; Thu, 29 May 2003 01:31:59 +0200
Received: from ecki by calista.inka.de with local   (Exim 3.35 #1 (Debian))
	id 19LAOj-0006qI-00; Thu, 29 May 2003 01:31:57 +0200
Date: Thu, 29 May 2003 01:31:56 +0200
To: control@bugs.debian.org, 191669-done@bugs.debian.org
Subject: oops
Message-ID: <20030528233156.GA26232@lina.inka.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
From: Bernd Eckenfels <ecki@lina.inka.de>
Delivered-To: 191669-done@bugs.debian.org
X-Spam-Status: No, hits=-7.3 required=4.0
	tests=BAYES_01,USER_AGENT_MUTT
	version=2.53-bugs.debian.org_2003_05_24
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_24 (1.174.2.15-2003-03-30-exp)

reopen 182487
thanks

obviously i closed the wrong bug :) sorry!




Reply to: