From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 12 Jan 2005 07:54:53 +0300 From: Alexey Tourbin To: devel@altlinux.ru Message-ID: <20050112045453.GE7854@solemn.turbinal.org> Mail-Followup-To: devel@altlinux.ru Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tMbDGjvJuJijemkf" Content-Disposition: inline Subject: [devel] [JT] Fwd: POSIX conformance in coreutils X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2005 04:55:53 -0000 Archived-At: List-Archive: List-Post: --tMbDGjvJuJijemkf Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =FE=D4=CF =C4=C5=CC=C1=C5=D4=D3=D1... ----- Forwarded message from Vin Shelton ----- Date: Tue, 11 Jan 2005 20:01:26 -0500 From: Vin Shelton Subject: POSIX conformance in coreutils To: zsh-workers@sunsite dk Message-ID: Organization: EtherSoft, Inc GNU coreutils (at least versions 5.2.1 and 5.3.0) enforce POSIX conformance, so they don't like 'tail -1', instead they require 'tail -n 1'. This causes problems in E01options.tst: # Count the number of directories on the stack. Don't care what they are. dircount() { dirs -v | tail -1 | awk '{ print $1 + 1}'; } tail: `-1' option is obsolete; use `-n 1' Try `tail --help' for more information. It's easy enough to change the E01options.tst script to use 'test -n 1', but that's probably not the right thing to do. We could also add _POSIX2_VERSION=3D199209 to the test. This would probably not break older versions of tail, and would force new versions of tail to accept the old syntax. Patch attached: Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/ChangeLog,v retrieving revision 1.2463 diff -a -u -U0 -r1.2463 ChangeLog --- ChangeLog 10 Jan 2005 18:43:19 -0000 1.2463 +++ ChangeLog 12 Jan 2005 00:58:28 -0000 @@ -0,0 +1,5 @@ +2005-01-11 Vin Shelton + + * Test/E01options.ztst: Add _POSIX2_VERSION=3D199209 to silence new + coreutils' versions of tail. + Index: Test/E01options.ztst =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Test/E01options.ztst,v retrieving revision 1.13 diff -a -u -r1.13 E01options.ztst --- Test/E01options.ztst 9 Sep 2004 15:03:31 -0000 1.13 +++ Test/E01options.ztst 12 Jan 2005 00:58:32 -0000 @@ -116,7 +116,7 @@ >scalar =20 # Count the number of directories on the stack. Don't care what they ar= e. - dircount() { dirs -v | tail -1 | awk '{ print $1 + 1}'; } + dircount() { dirs -v | _POSIX2_VERSION=3D199209 tail -1 | awk '{ print $= 1 + 1}'; } unsetopt autopushd cd tmpcd dircount HTH, Vin ----- End forwarded message ----- --tMbDGjvJuJijemkf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFB5K2dfBKgtDjnu0YRAj45AJ9gAC9KNtH3LyshC0vscViUYnwgcACfSp/l 266N65KxGz15OOn3tritOj8= =TI0U -----END PGP SIGNATURE----- --tMbDGjvJuJijemkf--