ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] [JT] Fwd: POSIX conformance in coreutils
@ 2005-01-12  4:54 Alexey Tourbin
  2005-01-12 10:47 ` [devel] " Michael Shigorin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexey Tourbin @ 2005-01-12  4:54 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2199 bytes --]

Что делается...

----- Forwarded message from Vin Shelton <acs@alumni.princeton edu> -----

Date: Tue, 11 Jan 2005 20:01:26 -0500
From: Vin Shelton <acs@alumni.princeton edu>
Subject: POSIX conformance in coreutils
To: zsh-workers@sunsite dk
Message-ID: <m3r7kr31g9.fsf@zion.rcn com>
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=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  <acs@xemacs.org>
+
+	* 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

----- End forwarded message -----

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [devel] Re: [JT] Fwd: POSIX conformance in coreutils
  2005-01-12  4:54 [devel] [JT] Fwd: POSIX conformance in coreutils Alexey Tourbin
@ 2005-01-12 10:47 ` Michael Shigorin
  2005-01-12 11:31 ` [devel] " Dmitry V. Levin
  2005-01-16  2:23 ` [devel] " Alexey Tourbin
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Shigorin @ 2005-01-12 10:47 UTC (permalink / raw)
  To: devel

On Wed, Jan 12, 2005 at 07:54:53AM +0300, Alexey Tourbin wrote:
> Что делается...
> 
> ----- Forwarded message from Vin Shelton -----
> Subject: POSIX conformance in coreutils
> 
> 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'.

Вот ведь уроды.  Стандарты для людей или люди для стандартов?
Так и назад в пещеры к uncomress | tar - докатимся...

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [devel] [JT] Fwd: POSIX conformance in coreutils
  2005-01-12  4:54 [devel] [JT] Fwd: POSIX conformance in coreutils Alexey Tourbin
  2005-01-12 10:47 ` [devel] " Michael Shigorin
@ 2005-01-12 11:31 ` Dmitry V. Levin
  2005-01-16  2:23 ` [devel] " Alexey Tourbin
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitry V. Levin @ 2005-01-12 11:31 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

On Wed, Jan 12, 2005 at 07:54:53AM +0300, Alexey Tourbin wrote:
> Что делается...
> 
> ----- Forwarded message from Vin Shelton <acs@alumni.princeton edu> -----
> 
> Date: Tue, 11 Jan 2005 20:01:26 -0500
> From: Vin Shelton <acs@alumni.princeton edu>
> Subject: POSIX conformance in coreutils
> To: zsh-workers@sunsite dk
> Message-ID: <m3r7kr31g9.fsf@zion.rcn com>
> 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'.

Для нашего coreutils это неактуально ввиду
coreutils-5.3.0-alt-posix2_version.patch


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [devel] Re: [JT] Fwd: POSIX conformance in coreutils
  2005-01-12  4:54 [devel] [JT] Fwd: POSIX conformance in coreutils Alexey Tourbin
  2005-01-12 10:47 ` [devel] " Michael Shigorin
  2005-01-12 11:31 ` [devel] " Dmitry V. Levin
@ 2005-01-16  2:23 ` Alexey Tourbin
  2 siblings, 0 replies; 4+ messages in thread
From: Alexey Tourbin @ 2005-01-16  2:23 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

On Wed, Jan 12, 2005 at 07:54:53AM +0300, Alexey Tourbin wrote:
> Что делается...

----- Forwarded message from Bart Schaefer <schaefer@brasslantern com> -----
 
Date: Fri, 14 Jan 2005 16:27:50 +0000
From: Bart Schaefer <schaefer@brasslantern com>
Subject: Austin Group Interpretation RE: tail -1
To: zsh-workers@sunsite dk
Message-Id: <1050114162750.ZM21952@candle.brasslantern com>
X-Mailer: Z-Mail (5.0.0 30July97)
 
Just as a footnote to the recent GNU coreutils discussion ...
 
Interpretation Number:  027
Date:  Tue, 24 Aug 2004 10:12:42
 
The standard permits implementations to have extensions that violate the
Utility Syntax Guidelines so long as when the utility is used in line
with the forms defined by the standard that it follows the Utility Syntax
Guidelines. Thus head -42 file and ls --help are permitted as extensions.
 
See http://www.opengroup.org/austin/interps/protected/documents.tpl
revised interpretation AI-027.
 
----- End forwarded message -----

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-16  2:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12  4:54 [devel] [JT] Fwd: POSIX conformance in coreutils Alexey Tourbin
2005-01-12 10:47 ` [devel] " Michael Shigorin
2005-01-12 11:31 ` [devel] " Dmitry V. Levin
2005-01-16  2:23 ` [devel] " Alexey Tourbin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git