From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: Shawn McMahon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 15:53:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 20514@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143092756116864 (code B ref -1); Wed, 06 May 2015 15:53:03 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2015 15:52:41 +0000 Received: from localhost ([127.0.0.1]:36428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq1cm-0004Nv-OT for submit@debbugs.gnu.org; Wed, 06 May 2015 11:52:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60038) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq1RB-00044j-Pw for submit@debbugs.gnu.org; Wed, 06 May 2015 11:40:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq1Qz-0004zG-VG for submit@debbugs.gnu.org; Wed, 06 May 2015 11:40:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq1Qz-0004z8-Pu for submit@debbugs.gnu.org; Wed, 06 May 2015 11:40:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq1Qy-0000fL-17 for bug-coreutils@gnu.org; Wed, 06 May 2015 11:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq1Qr-0004wY-5t for bug-coreutils@gnu.org; Wed, 06 May 2015 11:40:27 -0400 Received: from mail-yk0-x233.google.com ([2607:f8b0:4002:c07::233]:34474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq1Qq-0004wU-WB for bug-coreutils@gnu.org; Wed, 06 May 2015 11:40:21 -0400 Received: by ykft189 with SMTP id t189so3542958ykf.1 for ; Wed, 06 May 2015 08:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=H/HDKXvO7WNnaICM4KVQ4sym9H3f8cL2G4zO2m3Hjzs=; b=mGvtN1waZ4bq8mQhHdridqxm8m2+pG8IkYkJ+CZEkgL7UUWDa6XnCNTHuM0qj+NhC3 8T3jEinRnUwpCJYqPmDDkKN2qtuaOBuerXB2y/+60Qq8lv5pngr3TRNXtalCEik14ymA M/p2wB8Gs7D9BijX9XiOxasAvOiF06KeKmgZwVdPCjzEZFtPHWbFwC1a8EcORT3Ea7jy qoAG2eCLKSm1NWpp403fNzm1J4sMUI7Ovt64vHvctLNKGQUCS/mdHRLIYXC9g+NXnoLi kHPi6eijzpZqufNpM9z+2g3pEaAo5ytUWoqUrv+x58zXgslu+J5N0MubVbiu3bNLlKw+ Ftkg== MIME-Version: 1.0 X-Received: by 10.236.222.8 with SMTP id s8mr3762024yhp.168.1430926820557; Wed, 06 May 2015 08:40:20 -0700 (PDT) Received: by 10.13.202.2 with HTTP; Wed, 6 May 2015 08:40:20 -0700 (PDT) Date: Wed, 6 May 2015 11:40:20 -0400 Message-ID: From: Shawn McMahon Content-Type: multipart/alternative; boundary=089e016337fed6c99705156b9c4e X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Wed, 06 May 2015 11:52:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e016337fed6c99705156b9c4e Content-Type: text/plain; charset=UTF-8 The following patch to "test" ties the behavior of "--help" and "--version" to POSIXLY_CORRECT. I don't believe this breaks anything, and if it does it can by fixed by setting the time-honored variable. This will solve the problem of users occasionally being confused by this behavior, which has happened even recently to coreutils developers. See for example: http://lists.gnu.org/archive/html/coreutils/2015-03/msg00007.html Proposed ChangeLog entry: Author: Shawn McMahon Date: Tue May 5 20:32:00 2015 -0400 test: tie --help and --version behavior to POSIXLY_CORRECT diff --git a/a/src/test.c b/b/src/test.c index 80cc679..3e73bb9 100644 --- a/a/src/test.c +++ b/b/src/test.c @@ -789,6 +789,7 @@ INTEGER may also be -l STRING, which evaluates to the length of STRING.\n\ \n\ NOTE: [ honors the --help and --version options, but test does not.\n\ test treats each of those as it treats any other nonempty STRING.\n\ +If POSIXLY_CORRECT is set, test honors both.\n\ "), stdout); printf (USAGE_BUILTIN_WARNING, _("test and/or [")); emit_ancillary_info (PROGRAM_NAME); @@ -836,12 +837,12 @@ main (int margc, char **margv) argv = margv; - if (LBRACKET) + if (LBRACKET || getenv ("POSIXLY_CORRECT")) { /* Recognize --help or --version, but only when invoked in the - "[" form, when the last argument is not "]". Use direct - parsing, rather than parse_long_options, to avoid accepting - abbreviations. POSIX allows "[ --help" and "[ --version" to + "[" form, when the last argument is not "]", or when POSIXLY_CORRECT + is set. Use direct parsing, rather than parse_long_options, to avoid + accepting abbreviations. POSIX allows "[ --help" and "[ --version" to have the usual GNU behavior, but it requires "test --help" and "test --version" to exit silently with status 0. */ if (margc == 2) --089e016337fed6c99705156b9c4e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The following patch to "test" ties the behavior = of "--help" and "--version" to POSIXLY_CORRECT. I don&#= 39;t believe this breaks anything, and if it does it can by fixed by settin= g the time-honored variable. This will solve the problem of users occasiona= lly being confused by this behavior, which has happened even recently to co= reutils developers. See for example:

http://lists.gnu.org/archive= /html/coreutils/2015-03/msg00007.html


Proposed ChangeLog ent= ry:

Author: Shawn McMahon <syberghost@gmail.com>
Date: =C2=A0 Tue May 5 20:32:00 2015 -040= 0

=C2=A0 =C2=A0 test: tie --help and --version behavior to POSIXLY_C= ORRECT


diff --git a/a/src/test.c b/b/src/test.c
index 80cc679= ..3e73bb9 100644
--- a/a/src/test.c
+++ b/b/src/test.c
@@ -789,6 += 789,7 @@ INTEGER may also be -l STRING, which evaluates to the length of ST= RING.\n\
=C2=A0\n\
=C2=A0NOTE: [ honors the --help and --version opti= ons, but test does not.\n\
=C2=A0test treats each of those as it treats = any other nonempty STRING.\n\
+If POSIXLY_CORRECT is set, test honors bo= th.\n\
=C2=A0"), stdout);
=C2=A0 =C2=A0 =C2=A0 =C2=A0printf (USA= GE_BUILTIN_WARNING, _("test and/or ["));
=C2=A0 =C2=A0 =C2=A0 = =C2=A0emit_ancillary_info (PROGRAM_NAME);
@@ -836,12 +837,12 @@ main (in= t margc, char **margv)
=C2=A0
=C2=A0 =C2=A0argv =3D margv;
=C2=A0<= br>- =C2=A0if (LBRACKET)
+ =C2=A0if (LBRACKET || getenv ("POSIXLY_C= ORRECT"))
=C2=A0 =C2=A0 =C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Re= cognize --help or --version, but only when invoked in the
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "[" form, when the last argument is not "]= ".=C2=A0 Use direct
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 parsing, rather t= han parse_long_options, to avoid accepting
- =C2=A0 =C2=A0 =C2=A0 =C2=A0= abbreviations.=C2=A0 POSIX allows "[ --help" and "[ --versi= on" to
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 "[" form, when the l= ast argument is not "]", or when POSIXLY_CORRECT
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 is set. Use direct parsing, rather than parse_long_option= s, to avoid
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 accepting abbreviations.=C2=A0= POSIX allows "[ --help" and "[ --version" to
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 have the usual GNU behavior, but it requires &= quot;test --help"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 and "test= --version" to exit silently with status 0. =C2=A0*/
=C2=A0 =C2=A0 = =C2=A0 =C2=A0if (margc =3D=3D 2)


--089e016337fed6c99705156b9c4e-- From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Shawn McMahon , 20514@debbugs.gnu.org Received: via spool by 20514-submit@debbugs.gnu.org id=B20514.143092879618843 (code B ref 20514); Wed, 06 May 2015 16:14:01 +0000 Received: (at 20514) by debbugs.gnu.org; 6 May 2015 16:13:16 +0000 Received: from localhost ([127.0.0.1]:36436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq1wh-0004tq-QO for submit@debbugs.gnu.org; Wed, 06 May 2015 12:13:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47481) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq1wf-0004th-8r for 20514@debbugs.gnu.org; Wed, 06 May 2015 12:13:14 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 6146D8EFC9; Wed, 6 May 2015 16:13:12 +0000 (UTC) Received: from [10.3.113.25] (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t46GDBZJ020349; Wed, 6 May 2015 12:13:12 -0400 Message-ID: <554A3D97.8000101@redhat.com> Date: Wed, 06 May 2015 10:13:11 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 References: In-Reply-To: OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TCoQnGswViUNfrejEcKBEJ88hUulJdsQS" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TCoQnGswViUNfrejEcKBEJ88hUulJdsQS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/06/2015 09:40 AM, Shawn McMahon wrote: > The following patch to "test" ties the behavior of "--help" and "--vers= ion" > to POSIXLY_CORRECT. I don't believe this breaks anything, and if it doe= s it > can by fixed by setting the time-honored variable. This will solve the > problem of users occasionally being confused by this behavior, which ha= s > happened even recently to coreutils developers. See for example: >=20 > http://lists.gnu.org/archive/html/coreutils/2015-03/msg00007.html >=20 >=20 > Proposed ChangeLog entry: >=20 > Author: Shawn McMahon > Date: Tue May 5 20:32:00 2015 -0400 >=20 > test: tie --help and --version behavior to POSIXLY_CORRECT >=20 >=20 > diff --git a/a/src/test.c b/b/src/test.c > index 80cc679..3e73bb9 100644 > --- a/a/src/test.c > +++ b/b/src/test.c > @@ -789,6 +789,7 @@ INTEGER may also be -l STRING, which evaluates to t= he > length of STRING.\n\ > \n\ > NOTE: [ honors the --help and --version options, but test does not.\n\= > test treats each of those as it treats any other nonempty STRING.\n\ > +If POSIXLY_CORRECT is set, test honors both.\n\ Backwards. The point of POSIXLY_CORRECT is that if it is set, we conform to POSIX, if it is unset, then we have chosen to take on intentionally non-compliant behavior. If we make this change (and I'm 90-10 against changing anything at all), then: /bin/test --help would change to output help (as that is the non-compliant behavior), whil= e POSIXLY_CORRECT=3D1 /bin/test --help would be the one that silently gives 0 status (because that is what POSIX mandates). But the reason I'm against changing it is that checking an arbitrary string for empty content is SUCH a common operation that making certain arbitrary strings special is more likely to break behavior of unsuspecting programs. The escape hatch of "well, you should have set POSIXLY_CORRECT" is unappealing, as turning on POSIX compliance often cripples other non-standard extensions that people tend to rely on. >=20 > - if (LBRACKET) > + if (LBRACKET || getenv ("POSIXLY_CORRECT")) Again, if we make the change, this logic is backwards (it should be checking if POSIXLY_CORRECT is not set). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TCoQnGswViUNfrejEcKBEJ88hUulJdsQS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVSj2XAAoJEKeha0olJ0NqgSAH/2aSOAZj2RavOetvdsJpiChT OwdxjixrriIFy+3EbzMlqTfekHBha+wbmxvbtt5kXYHVWnTni3lBzai1T2Fa2acu tq2nxYvpi4AQxN+Bl7tJw6qGajWkLSdo4ZJ334svADU00MAJNTqKGCDMnN4huiMN 7bFm4FOJ9xKHt16aB3rmw+VVAv56MVaVI6lLjpdaoOYK7wJZZXWzfANHcT0HL1Lg xiKObk4kERpJecWLcTMTN16IWG2zPlXpynwQbPfE5akAeim/86k/JANlY6uCTJf1 XQd8TZ02A/vbiNjngfBUEeDKWaHO+rTDCaiQddgCawCoHqmF3jSokA1fGHUod0U= =lKQa -----END PGP SIGNATURE----- --TCoQnGswViUNfrejEcKBEJ88hUulJdsQS-- From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 16:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Shawn McMahon , 20514@debbugs.gnu.org Received: via spool by 20514-submit@debbugs.gnu.org id=B20514.143092902619270 (code B ref 20514); Wed, 06 May 2015 16:18:02 +0000 Received: (at 20514) by debbugs.gnu.org; 6 May 2015 16:17:06 +0000 Received: from localhost ([127.0.0.1]:36445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq20P-00050j-Fr for submit@debbugs.gnu.org; Wed, 06 May 2015 12:17:05 -0400 Received: from mail6.vodafone.ie ([213.233.128.184]:35605) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq20M-0004zl-Bg for 20514@debbugs.gnu.org; Wed, 06 May 2015 12:17:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowdACM9SlVtTkk8/2dsb2JhbABcgwwfNFyBOoEVTsQcCoYCAQICgSZMAQEBAQEBgQtBAQICg1sBAQQBAiAPAVYLDQsCAgUWCwICCQMCAQIBFi8GAQwIAQGILAEIsUaFaY4UAQEIAiCBIYoYhQyCaIFFBZY5hBODVT2GBoRthhGDUyODdj0xAYJEAQEB Received: from unknown (HELO localhost.localdomain) ([109.78.73.60]) by mail3.vodafone.ie with ESMTP; 06 May 2015 17:16:53 +0100 Message-ID: <554A3E75.5060800@draigBrady.com> Date: Wed, 06 May 2015 17:16:53 +0100 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 06/05/15 16:40, Shawn McMahon wrote: > The following patch to "test" ties the behavior of "--help" and "--version" to POSIXLY_CORRECT. I don't believe this breaks anything, and if it does it can by fixed by setting the time-honored variable. This will solve the problem of users occasionally being confused by this behavior, which has happened even recently to coreutils developers. See for example: > > http://lists.gnu.org/archive/html/coreutils/2015-03/msg00007.html Your patch logic is confusing me. I presume you mean to have `test --help` output usage by default? If so I'm not sure it's appropriate to change that. Consider a script like the following, which would spuriously output the version. option='--version' test "$option" || { usage; exit 1; } cmd $option thanks, Pádraig From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: Shawn McMahon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake Cc: 20514@debbugs.gnu.org Received: via spool by 20514-submit@debbugs.gnu.org id=B20514.143092963420245 (code B ref 20514); Wed, 06 May 2015 16:28:02 +0000 Received: (at 20514) by debbugs.gnu.org; 6 May 2015 16:27:14 +0000 Received: from localhost ([127.0.0.1]:36449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2AE-0005GT-1x for submit@debbugs.gnu.org; Wed, 06 May 2015 12:27:14 -0400 Received: from mail-yk0-f171.google.com ([209.85.160.171]:33024) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2AC-0005GD-7w for 20514@debbugs.gnu.org; Wed, 06 May 2015 12:27:12 -0400 Received: by ykeo186 with SMTP id o186so3937581yke.0 for <20514@debbugs.gnu.org>; Wed, 06 May 2015 09:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6IWh1qbgm2kN5Adp+mkDIiOjmpAO/MQzHPGb4RPkqjg=; b=JTKf5sJaKvTIV63OChj8Kt/zTYldeL4IFN2m5uH4asMAoUGw5gG9Rq8pvbOpxKuiWz RERNtqBwL8+AnO0EzqF4Ri+tRWaXDBCtqks23fTLsbyG57XOOc/qsdXEP2/MUxkVBSuk srASBzzIMsjLI8G3uSIPkK5U3ZOgKXrDQzJqKfsvoqGCvoGUQb0EedkF06UQ3VOT4xtY WMi0Igt5lA4QQwLr9BkQhSTx6x60E6qwtNcJS0ZADESGlyFQ71Xwlfst9P7mjo+qUO9x yre8OljcmvZ5j+bMyl7uWyqs2oRhDEBMICnOkcymZJbzugGGnGReoJ2Nsu5e2rnqgccK nQDQ== MIME-Version: 1.0 X-Received: by 10.170.96.138 with SMTP id n132mr25178156yka.109.1430929626795; Wed, 06 May 2015 09:27:06 -0700 (PDT) Received: by 10.13.202.2 with HTTP; Wed, 6 May 2015 09:27:06 -0700 (PDT) In-Reply-To: <554A3D97.8000101@redhat.com> References: <554A3D97.8000101@redhat.com> Date: Wed, 6 May 2015 12:27:06 -0400 Message-ID: From: Shawn McMahon Content-Type: multipart/alternative; boundary=001a113b58301abb7005156c44b8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113b58301abb7005156c44b8 Content-Type: text/plain; charset=UTF-8 Wow, how embarrassing. Yes, I clearly have my logic backwards on that. :( --001a113b58301abb7005156c44b8 Content-Type: text/html; charset=UTF-8
Wow, how embarrassing. Yes, I clearly have my logic backwards on that. :(


--001a113b58301abb7005156c44b8-- From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: Shawn McMahon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 20514@debbugs.gnu.org Received: via spool by 20514-submit@debbugs.gnu.org id=B20514.143092986820724 (code B ref 20514); Wed, 06 May 2015 16:32:02 +0000 Received: (at 20514) by debbugs.gnu.org; 6 May 2015 16:31:08 +0000 Received: from localhost ([127.0.0.1]:36458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2Dz-0005OC-TD for submit@debbugs.gnu.org; Wed, 06 May 2015 12:31:08 -0400 Received: from mail-yk0-f171.google.com ([209.85.160.171]:34143) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2Dy-0005Nf-3J for 20514@debbugs.gnu.org; Wed, 06 May 2015 12:31:06 -0400 Received: by ykft189 with SMTP id t189so3975029ykf.1 for <20514@debbugs.gnu.org>; Wed, 06 May 2015 09:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Acf0vVv6DBf/1SweR/b4SGkL54QRj54XxzKS5Th0oN8=; b=WAJWEamp0Gl+nLN/TN04QXO7IYjwsOCihke2gX1YlEpWE91owvgggwwjsQ+QSn61Sf IdvEf4Se/gsyJCD61tH1GfKXpod6FAIJP6JiUErE+fsUiZ+zjpn4irksIcLnc2lmVhv0 3pVLvlRSPMTHP7bBAPJwGQ9jA2jh1e9PZ4xHj1KnEx4S8Lqh0KRCfTbE+OUtT6qM0mqP ip8NbjGfIEgFLW8jfRYK9gdoFcSCa0yFT6fs/VvVhucVhNfONHwEPXL6v64cA1p90kSn CYTteKwN91Yn7lHghJyS8PaJK++QHGOEpRgGuSlAO8xNQrHZp/K1y8sYL7UIPWKrxtR4 +4lQ== MIME-Version: 1.0 X-Received: by 10.236.89.171 with SMTP id c31mr22495009yhf.149.1430929860750; Wed, 06 May 2015 09:31:00 -0700 (PDT) Received: by 10.13.202.2 with HTTP; Wed, 6 May 2015 09:31:00 -0700 (PDT) In-Reply-To: <554A3E75.5060800@draigBrady.com> References: <554A3E75.5060800@draigBrady.com> Date: Wed, 6 May 2015 12:31:00 -0400 Message-ID: From: Shawn McMahon Content-Type: multipart/alternative; boundary=001a11c2504a0c732605156c52bf X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c2504a0c732605156c52bf Content-Type: text/plain; charset=UTF-8 I got my patch logic backwards and you're right, that's way too common a use case to break. You can close this wontfix. Sorry to have wasted folks' time on this. --001a11c2504a0c732605156c52bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I got my patch logic backwards = and you're right, that's way too common a use case to break.
<= div class=3D"gmail_extra">
You can clos= e this wontfix. Sorry to have wasted folks' time on this.
--001a11c2504a0c732605156c52bf-- From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Shawn McMahon , 20514@debbugs.gnu.org Received: via spool by 20514-submit@debbugs.gnu.org id=B20514.143093016621213 (code B ref 20514); Wed, 06 May 2015 16:37:02 +0000 Received: (at 20514) by debbugs.gnu.org; 6 May 2015 16:36:06 +0000 Received: from localhost ([127.0.0.1]:36466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2In-0005W5-KO for submit@debbugs.gnu.org; Wed, 06 May 2015 12:36:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51352) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2Ik-0005Va-S1 for 20514@debbugs.gnu.org; Wed, 06 May 2015 12:36:04 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t46Ga1NG008939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 6 May 2015 12:36:01 -0400 Received: from [10.3.113.25] (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t46Ga0D9007085; Wed, 6 May 2015 12:36:01 -0400 Message-ID: <554A42F0.8090207@redhat.com> Date: Wed, 06 May 2015 10:36:00 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 References: <554A3D97.8000101@redhat.com> In-Reply-To: <554A3D97.8000101@redhat.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iIEWaa7OWhfta1VRqmijjQ2qgweD1pofv" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iIEWaa7OWhfta1VRqmijjQ2qgweD1pofv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/06/2015 10:13 AM, Eric Blake wrote: > intentionally non-compliant behavior. If we make this change (and I'm > 90-10 against changing anything at all), then: >=20 > But the reason I'm against changing it is that checking an arbitrary > string for empty content is SUCH a common operation that making certain= > arbitrary strings special is more likely to break behavior of > unsuspecting programs. The escape hatch of "well, you should have set > POSIXLY_CORRECT" is unappealing, as turning on POSIX compliance often > cripples other non-standard extensions that people tend to rely on. Another argument against the change: This proposal would only affect /bin/test (or 'env test', or other constructs that force resolution through PATH). However, most shells have 'test' as a builtin, so it will NOT impact those instances. Having coreutils needlessly differ from other implementations is undesirable. If you can first get 'bash' patched to do this, you might have a stronger argument, but bash is one of those programs where the mere act of setting POSIXLY_CORRECT in the environment changes a lot about how bash behaves. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --iIEWaa7OWhfta1VRqmijjQ2qgweD1pofv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVSkLwAAoJEKeha0olJ0Nqk0UH/ionNodXbno58lPS9Nylc2KH ULM9wOidhPOE88QUDEuQFzIR5mmDNvr+y+Mc9siGbxc4iG6kxpLdpR3CjFX4i4ul 6f9qgiQ15Dx0yOuGf7dpSr7BkHZf637cMBJz9kTWAMvbOol+ZvUsQlv5istphAA9 mNLvJlAxzmq0LzfqNUM5ynnN46eTZcrepA6009qvONfWijIRqshWTU/VL18tUF/p 9XmAp7um0Mw4bwQ+336OoWxy0fokDwRGlliomFNND8Do/23hySCq7sXYfLjHbDEq snYb2NyOCjnQ53KXkgLkouyiU3snzMS211V0Vr5TMC5+DpA4/2bLmVi13EMmzNU= =If3w -----END PGP SIGNATURE----- --iIEWaa7OWhfta1VRqmijjQ2qgweD1pofv-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 12:40:50 2015 Received: (at control) by debbugs.gnu.org; 6 May 2015 16:40:50 +0000 Received: from localhost ([127.0.0.1]:36470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2NO-0005cz-59 for submit@debbugs.gnu.org; Wed, 06 May 2015 12:40:50 -0400 Received: from mail4.vodafone.ie ([213.233.128.170]:34420) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2NL-0005ck-Ip for control@debbugs.gnu.org; Wed, 06 May 2015 12:40:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIiAC1DSlVtTkk8/2dsb2JhbABcgwyBEQaBUoEVTokzqzWVOzV7TAEBAQEBAYELQQECAoN6CipUDQIFFgsCCwMCAQIBOQYCAggNCAEBiCwBohaPV4VpjiKBIZIMgUUFpGSOUSOBRgEBCAIBgiM9gnYCAQI Received: from unknown (HELO localhost.localdomain) ([109.78.73.60]) by mail3.vodafone.ie with ESMTP; 06 May 2015 17:40:41 +0100 Message-ID: <554A4409.1080302@draigBrady.com> Date: Wed, 06 May 2015 17:40:41 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: GNU bug tracker automated control server Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tag 20514 wontfix close 20514 stop [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [213.233.128.170 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tag 20514 wontfix close 20514 stop [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [213.233.128.170 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject tag 20514 wontfix close 20514 stop From unknown Sat Sep 20 04:47:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT Resent-From: Shawn McMahon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 06 May 2015 16:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20514 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: wontfix To: Eric Blake Cc: 20514@debbugs.gnu.org Received: via spool by 20514-submit@debbugs.gnu.org id=B20514.143093056721855 (code B ref 20514); Wed, 06 May 2015 16:43:02 +0000 Received: (at 20514) by debbugs.gnu.org; 6 May 2015 16:42:47 +0000 Received: from localhost ([127.0.0.1]:36476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2PG-0005gQ-Ru for submit@debbugs.gnu.org; Wed, 06 May 2015 12:42:47 -0400 Received: from mail-yh0-f44.google.com ([209.85.213.44]:35462) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq2PF-0005gE-6s for 20514@debbugs.gnu.org; Wed, 06 May 2015 12:42:45 -0400 Received: by yhda23 with SMTP id a23so3903127yhd.2 for <20514@debbugs.gnu.org>; Wed, 06 May 2015 09:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VxXVNYhc9EH2U4Uy/cauLAQUx4J/Q8BkYJlaauM19+4=; b=tLOI9u/zNkuLoNzRTstXOGWt3ciK64jYU/OwDYw2F9Cc9Pez+FXq+x+TfFkvfOF0Qj /Sch0nUuj66ZPnA0wmshz32Kgwya/61tsxb5KK6hcjXPHhCa2pyT2t4DkJZ6IVmxdtxa oY7YWDo5y+32QSmI8AXyurdZSpuewgPC8KEhl2PTPrb+yz/dCW2T0YRyC9EkEPtWZg3q 9yWA+4OXElnJV3vAOpBtU8SIipEina+AVhx5w0t7MeGLEptbruGvX8nQyYYW2ulb/zJx sj005EdnY6VBGoP20ryICf9ZsrqT3BTWGPGVGveE1NwzRBFtVLcvjPKoG6ncNUPaAIsP qQgA== MIME-Version: 1.0 X-Received: by 10.170.54.203 with SMTP id 194mr25540569ykw.105.1430930559642; Wed, 06 May 2015 09:42:39 -0700 (PDT) Received: by 10.13.202.2 with HTTP; Wed, 6 May 2015 09:42:39 -0700 (PDT) In-Reply-To: <554A42F0.8090207@redhat.com> References: <554A3D97.8000101@redhat.com> <554A42F0.8090207@redhat.com> Date: Wed, 6 May 2015 12:42:39 -0400 Message-ID: From: Shawn McMahon Content-Type: multipart/alternative; boundary=001a113a81aab4b26105156c7b83 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113a81aab4b26105156c7b83 Content-Type: text/plain; charset=UTF-8 On Wed, May 6, 2015 at 12:36 PM, Eric Blake wrote: > > Another argument against the change: This proposal would only affect > /bin/test (or 'env test', or other constructs that force resolution > through PATH). However, most shells have 'test' as a builtin, so it > will NOT impact those instances. Having coreutils needlessly differ > from other implementations is undesirable. If you can first get 'bash' > patched to do this, you might have a stronger argument, but bash is one > of those programs where the mere act of setting POSIXLY_CORRECT in the > environment changes a lot about how bash behaves. bash is actually worse, since "[ --help" doesn't work with the builtin. But agreed on your point. --001a113a81aab4b26105156c7b83 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, May 6, 2015 at 12:36 PM, Eric Blake <eblake@redhat.com> = wrote:

Anothe= r argument against the change: This proposal would only affect
/bin/test (or 'env test', or other constructs that force resolution=
through PATH).=C2=A0 However, most shells have 'test' as a builtin,= so it
will NOT impact those instances.=C2=A0 Having coreutils needlessly differ from other implementations is undesirable.=C2=A0 If you can first get '= bash'
patched to do this, you might have a stronger argument, but bash is one
of those programs where the mere act of setting POSIXLY_CORRECT in the
environment changes a lot about how bash behaves.

bash is actually worse, since "[ --help" =C2=A0doesn't= work with the builtin. But agreed on your point.

--001a113a81aab4b26105156c7b83--