From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25376 invoked from network); 12 Jan 2005 01:01:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Jan 2005 01:01:44 -0000 Received: (qmail 33134 invoked from network); 12 Jan 2005 01:01:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Jan 2005 01:01:36 -0000 Received: (qmail 14767 invoked by alias); 12 Jan 2005 01:01:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20690 Received: (qmail 14747 invoked from network); 12 Jan 2005 01:01:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Jan 2005 01:01:19 -0000 Received: (qmail 31964 invoked from network); 12 Jan 2005 01:01:19 -0000 Received: from smtp01.mrf.mail.rcn.net (207.172.4.60) by a.mx.sunsite.dk with SMTP; 12 Jan 2005 01:01:16 -0000 Received: from 209-6-229-49.c3-0.nwt-ubr2.sbo-nwt.ma.cable.rcn.com ([209.6.229.49] helo=zion.rcn.com) by smtp01.mrf.mail.rcn.net with esmtp (Exim 3.35 #7) id 1CoWss-0005pf-00 for zsh-workers@sunsite.dk; Tue, 11 Jan 2005 20:01:14 -0500 Received: by zion.rcn.com (Postfix, from userid 500) id 2BF40E85E; Tue, 11 Jan 2005 20:01:26 -0500 (EST) To: zsh-workers@sunsite.dk Subject: POSIX conformance in coreutils From: Vin Shelton Organization: EtherSoft, Inc Date: Tue, 11 Jan 2005 20:01:26 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 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=199209 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 =================================================================== 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=199209 to silence new + coreutils' versions of tail. + Index: Test/E01options.ztst =================================================================== 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 # Count the number of directories on the stack. Don't care what they are. - dircount() { dirs -v | tail -1 | awk '{ print $1 + 1}'; } + dircount() { dirs -v | _POSIX2_VERSION=199209 tail -1 | awk '{ print $1 + 1}'; } unsetopt autopushd cd tmpcd dircount HTH, Vin