From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 12:10:09 2012 Received: (at submit) by debbugs.gnu.org; 15 Feb 2012 17:10:10 +0000 Received: from localhost ([127.0.0.1]:41666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxiMo-0002TZ-9q for submit@debbugs.gnu.org; Wed, 15 Feb 2012 12:10:09 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34788) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxghN-0008U0-47 for submit@debbugs.gnu.org; Wed, 15 Feb 2012 10:23:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxgfY-0007se-7G for submit@debbugs.gnu.org; Wed, 15 Feb 2012 10:21:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RECEIVED_FROM_WINDOWS_HOST autolearn=no version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:39374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxgfY-0007sa-5p for submit@debbugs.gnu.org; Wed, 15 Feb 2012 10:21:20 -0500 Received: from eggs.gnu.org ([140.186.70.92]:58884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxgfI-0008E2-PG for bug-coreutils@gnu.org; Wed, 15 Feb 2012 10:21:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxgfE-0007qN-Ti for bug-coreutils@gnu.org; Wed, 15 Feb 2012 10:21:04 -0500 Received: from ch1ehsobe004.messaging.microsoft.com ([216.32.181.184]:39192 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxgfE-0007oP-RI for bug-coreutils@gnu.org; Wed, 15 Feb 2012 10:21:00 -0500 Received: from mail123-ch1-R.bigfish.com (10.43.68.245) by CH1EHSOBE002.bigfish.com (10.43.70.52) with Microsoft SMTP Server id 14.1.225.23; Wed, 15 Feb 2012 15:05:51 +0000 Received: from mail123-ch1 (localhost [127.0.0.1]) by mail123-ch1-R.bigfish.com (Postfix) with ESMTP id 38D262E013D for ; Wed, 15 Feb 2012 15:05:51 +0000 (UTC) X-SpamScore: 3 X-BigFish: PS3(zzc89bhzz1202hzzz2dh2a8h668h839h8e2h8e3hbe9k) X-Forefront-Antispam-Report: CIP:157.55.9.135; KIP:(null); UIP:(null); IPV:NLI; H:DB3PRD0104HT010.eurprd01.prod.exchangelabs.com; RD:none; EFVD:NLI Received: from mail123-ch1 (localhost.localdomain [127.0.0.1]) by mail123-ch1 (MessageSwitch) id 1329318349568490_20512; Wed, 15 Feb 2012 15:05:49 +0000 (UTC) Received: from CH1EHSMHS029.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.247]) by mail123-ch1.bigfish.com (Postfix) with ESMTP id 7D7421E0049 for ; Wed, 15 Feb 2012 15:05:49 +0000 (UTC) Received: from DB3PRD0104HT010.eurprd01.prod.exchangelabs.com (157.55.9.135) by CH1EHSMHS029.bigfish.com (10.43.70.29) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 15 Feb 2012 15:05:49 +0000 Received: from [10.10.250.167] (163.5.101.145) by pod51002.outlook.com (10.3.186.104) with Microsoft SMTP Server (TLS) id 14.15.39.1; Wed, 15 Feb 2012 15:05:47 +0000 Message-ID: <4F3BC9C7.3060204@epitech.eu> Date: Wed, 15 Feb 2012 16:05:43 +0100 From: "jeremy.magrin@epitech.eu" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Subject: [BUG][RM] Content-Type: text/plain; charset="ISO-8859-1"; format=flowed X-Originating-IP: [163.5.101.145] Content-Transfer-Encoding: quoted-printable X-OriginatorOrg: epitech.eu X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 15 Feb 2012 12:09:59 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Hello, I'm writing to you to inform you of a possible bug in the linux "rm" comm= and. I've experienced that when using by error the said command as following : "rm - rf#*" if there is no file named #*# (* being the same as in the console, anythi= ng) in the current directory, rm quits as expected because of the incorre= ct syntax. But if there is a file named #*#, rm deletes all the current file's conte= nt except the said file. Regards, --=20 ---------------------- MAGRIN J=E9r=E9my {Epitech.} - Bordeaux Promo : 2016 mail : jeremy.magrin@epitech.eu From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 17:08:07 2012 Received: (at 10819) by debbugs.gnu.org; 15 Feb 2012 22:08:07 +0000 Received: from localhost ([127.0.0.1]:41888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxn18-0000ub-Dh for submit@debbugs.gnu.org; Wed, 15 Feb 2012 17:08:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3524) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxn0y-0000u1-Am; Wed, 15 Feb 2012 17:07:57 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1FM67GO018589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Feb 2012 17:06:07 -0500 Received: from [10.3.113.140] (ovpn-113-140.phx2.redhat.com [10.3.113.140]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1FM65sN009438; Wed, 15 Feb 2012 17:06:06 -0500 Message-ID: <4F3C2C4D.4060004@redhat.com> Date: Wed, 15 Feb 2012 15:06:05 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: "jeremy.magrin@epitech.eu" Subject: Re: bug#10819: [BUG][RM] References: <4F3BC9C7.3060204@epitech.eu> In-Reply-To: <4F3BC9C7.3060204@epitech.eu> X-Enigmail-Version: 1.3.5 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig336BA402E90C1591CE8D3DD3" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10819 Cc: 10819@debbugs.gnu.org, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig336BA402E90C1591CE8D3DD3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable tag 10819 needinfo thanks On 02/15/2012 08:05 AM, jeremy.magrin@epitech.eu wrote: > Hello, >=20 > I'm writing to you to inform you of a possible bug in the linux "rm" > command. > I've experienced that when using by error the said command as following= : > "rm - rf#*" That's (probably) not a valid command. By putting a space between - and r, you are asking rm to remove the literal files named "-" and any files that match the glob "rf#*". Did you mean to type "rm -rf #*" instead, which says to recursively and without warning remove any files that match the glob "#*"? It would help us if your report was actual copy-and-paste contents of what you really did: ls to list directory contents beforehand, then the rm call you used, then ls afterwards to show what remains, as well as how that differs from your expectations. > if there is no file named #*# (* being the same as in the console, > anything) in the current directory, rm quits as expected because of the= > incorrect syntax. > But if there is a file named #*#, rm deletes all the current file's > content except the said file. Meanwhile, I'm going to guess that you may be hitting one of our FAQ on how globbing works, and how to make rm remove what you want it to remove:= https://www.gnu.org/software/coreutils/faq/#Why-doesn_0027t-rm-_002dr-_00= 2a_002epattern-recurse-like-it-should_003f Look at other FAQ in the vicinity. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig336BA402E90C1591CE8D3DD3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPPCxNAAoJEKeha0olJ0NqEu0IAK8QZg03MZBV0JzUT81I7lrY wHZhSlgApgYBlSkiT/JHDMAL7n9ja8c571HjenM9MuH3I2KWoq0pbaDAKBiZ/O0U Kbt+MwTqVGwoVSrzqDzxU12YXbGizQFzG4yZYwFTcDe3fqYgJBzi3cvwzj/QVUeq NQ5jO/K1DAsAU5CfCmVoBREKXav5zWcK/hLaG/TpqcRDnh+Nh1vExCRHmFCOo1b/ kfRZuHXJK5NZGxUSUAMBDUxb2V+uCe8pJJz0MTWbNx9t3WnRyFKCqesSCltoCfB9 UO9+lE8B75aO3TqNkElMGzqh6kmWaWYgBbWBCgWBucwz2tsA5Y5VthipqCjYxvo= =oBkd -----END PGP SIGNATURE----- --------------enig336BA402E90C1591CE8D3DD3-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 17:29:06 2012 Received: (at control) by debbugs.gnu.org; 15 Feb 2012 22:29:06 +0000 Received: from localhost ([127.0.0.1]:41901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxnLS-00029H-6K for submit@debbugs.gnu.org; Wed, 15 Feb 2012 17:29:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6868) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxnLM-00028z-6Z for control@debbugs.gnu.org; Wed, 15 Feb 2012 17:29:01 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1FMRA7r019006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Feb 2012 17:27:11 -0500 Received: from [10.3.113.140] (ovpn-113-140.phx2.redhat.com [10.3.113.140]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1FMRAr5025162 for ; Wed, 15 Feb 2012 17:27:10 -0500 Message-ID: <4F3C313E.1070608@redhat.com> Date: Wed, 15 Feb 2012 15:27:10 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: Re: Processed (with 1 errors): Re: bug#10819: [BUG][RM] References: <4F3C2C4D.4060004@redhat.com> In-Reply-To: X-Enigmail-Version: 1.3.5 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig2AC46E8DE2E391053FD8AFA2" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2AC46E8DE2E391053FD8AFA2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 10819 moreinfo thanks On 02/15/2012 03:09 PM, GNU bug Tracking System wrote: > Processing commands for control@debbugs.gnu.org: >=20 >> tag 10819 needinfo > Unknown tag/s: needinfo. > Recognized are: patch wontfix moreinfo unreproducible fixed notabug pen= ding help security confirmed. >=20 >> thanks > Stopping processing here. >=20 > Please contact help-debbugs@gnu.org if you need assistance. >=20 > GNU bugs database, http://debbugs.gnu.org/ >=20 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig2AC46E8DE2E391053FD8AFA2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPPDE+AAoJEKeha0olJ0NqMPUIAIv3jot7oO8Vu4Kwn/XpeynF 12lM5mOC5TpJZiCX+3ktLaEgHSixCeRExUfTygcPCjQU33q4M5ymnRHOlPWlwC1k QyWFlEcBPD0DDdKBJ15r6lua8kk3Xq/ocqD70uacgpJA3Wkk4eXeGw2hDJs1OFod h0+evX5MRBATdWlFbzcdBBDDhe+wJUdi00mFEgtVFD1Jb+5ZXL9cmzkjqfE0zzw0 DJnDtjRbcM9ERbxk8y8enTRouG2mM+GOO8sBRyzuR21kAtzsUpomXa1xpec2l+8E 64+UDw26zXXabNKO/NxB/lHHF6XZTkCo0gxENrlZKzkMSszu5mHzbC26YY5XSkk= =0fPt -----END PGP SIGNATURE----- --------------enig2AC46E8DE2E391053FD8AFA2-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 03:32:45 2012 Received: (at submit) by debbugs.gnu.org; 16 Feb 2012 08:32:45 +0000 Received: from localhost ([127.0.0.1]:42156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxwle-0000Ex-1v for submit@debbugs.gnu.org; Thu, 16 Feb 2012 03:32:45 -0500 Received: from eggs.gnu.org ([140.186.70.92]:50757) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxwlY-0000Ei-Pb for submit@debbugs.gnu.org; Thu, 16 Feb 2012 03:32:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxwjh-0001AW-8f for submit@debbugs.gnu.org; Thu, 16 Feb 2012 03:30:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:58701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxwjh-0001AS-7A for submit@debbugs.gnu.org; Thu, 16 Feb 2012 03:30:41 -0500 Received: from eggs.gnu.org ([140.186.70.92]:45361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxwjb-0005y0-IO for bug-coreutils@gnu.org; Thu, 16 Feb 2012 03:30:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxwjV-00019Y-Ox for bug-coreutils@gnu.org; Thu, 16 Feb 2012 03:30:35 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:57721 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RxwjV-00019S-FC for bug-coreutils@gnu.org; Thu, 16 Feb 2012 03:30:29 -0500 Received: (qmail invoked by alias); 16 Feb 2012 08:30:22 -0000 Received: from mail.diprotech.com (EHLO zoot.sax) [213.27.221.18] by mail.gmx.com (mp-us007) with SMTP; 16 Feb 2012 03:30:22 -0500 X-Authenticated: #48875277 X-Provags-ID: V01U2FsdGVkX18YtFkylfUYXMte9/lN2TChkMCWElqxiwjrv1/m7Y S0t38DnY+zLb6q Date: Thu, 16 Feb 2012 09:30:20 +0100 From: Davide Brini To: bug-coreutils@gnu.org Subject: Re: bug#10819: [BUG][RM] In-Reply-To: <4F3C2C4D.4060004@redhat.com> References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Wed, 15 Feb 2012 15:06:05 -0700, Eric Blake wrote: > tag 10819 needinfo > thanks > > On 02/15/2012 08:05 AM, jeremy.magrin@epitech.eu wrote: > > Hello, > > > > I'm writing to you to inform you of a possible bug in the linux "rm" > > command. > > I've experienced that when using by error the said command as > > following : "rm - rf#*" > > That's (probably) not a valid command. By putting a space between - and > r, you are asking rm to remove the literal files named "-" and any files > that match the glob "rf#*". Did you mean to type "rm -rf #*" instead, > which says to recursively and without warning remove any files that > match the glob "#*"? At least in bash, but I suppose in other shells too, rm -rf #* treats the "#*" part as a comment, and (if you remove the "-f") complains about missing operand to rm. -- D. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 03:40:14 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 08:40:14 +0000 Received: from localhost ([127.0.0.1]:42161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxwsw-0000Oz-Bn for submit@debbugs.gnu.org; Thu, 16 Feb 2012 03:40:14 -0500 Received: from mx.meyering.net ([88.168.87.75]:52747) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxwsu-0000Or-N0 for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 03:40:13 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id E81DC60062; Thu, 16 Feb 2012 09:38:24 +0100 (CET) From: Jim Meyering To: Davide Brini Subject: Re: bug#10819: [BUG][RM] In-Reply-To: (Davide Brini's message of "Thu, 16 Feb 2012 09:30:20 +0100") References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> Date: Thu, 16 Feb 2012 09:38:24 +0100 Message-ID: <87pqdfqikf.fsf@rho.meyering.net> Lines: 17 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819 Cc: 10819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Davide Brini wrote: ... > At least in bash, but I suppose in other shells too, > > rm -rf #* > > treats the "#*" part as a comment, and (if you remove the "-f") complains > about missing operand to rm. That is the default, but for an interactive shell, that behavior can be changed: $ echo a b # c a b $ shopt -u interactive_comments $ echo a b # c a b # c From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 05:19:13 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 10:19:14 +0000 Received: from localhost ([127.0.0.1]:42237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxyQj-0002bU-Og for submit@debbugs.gnu.org; Thu, 16 Feb 2012 05:19:13 -0500 Received: from senmx11-mx.siemens-enterprise.com ([62.134.46.9]:44655) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxyQg-0002bG-Vj for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 05:19:11 -0500 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx11-mx.siemens-enterprise.com (Server) with ESMTP id 9DD681EB8468; Thu, 16 Feb 2012 11:17:17 +0100 (CET) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Thu, 16 Feb 2012 11:17:17 +0100 From: "Voelker, Bernhard" To: Jim Meyering , Davide Brini Date: Thu, 16 Feb 2012 11:17:16 +0100 Subject: RE: bug#10819: [BUG][RM] Thread-Topic: bug#10819: [BUG][RM] Thread-Index: AczshnskQJ9e7jBIRfiWTck2oZYzXgADM+Xg Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> In-Reply-To: <87pqdfqikf.fsf@rho.meyering.net> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jim Meyering wrote: > Davide Brini wrote: > ... > > At least in bash, but I suppose in other shells too, > > > > rm -rf #* > > > > treats the "#*" part as a comment, and (if you remove the "-f") complai= ns > > about missing operand to rm. >=20 > That is the default, but for an interactive shell, > that behavior can be changed: >=20 > $ echo a b # c > a b > $ shopt -u interactive_comments > $ echo a b # c > a b # c I think Davide's point is not about the # comment ... rm won't see that on argv anyway. The point is that 'rm -f' does not complain about missing operands while 'rm' does: $ rm=20 rm: missing operand Try `rm --help' for more information. $ rm -f $ According to the info, '-f' just silences error messages for files which do not exist (and never to prompt for confirmation), but why should it also affect the "missing operand" message? Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 06:00:58 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 11:00:58 +0000 Received: from localhost ([127.0.0.1]:42252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxz57-0003Xv-F9 for submit@debbugs.gnu.org; Thu, 16 Feb 2012 06:00:58 -0500 Received: from mx.meyering.net ([88.168.87.75]:53091) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxz54-0003Xm-BQ for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 06:00:55 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C6AB76009B; Thu, 16 Feb 2012 11:59:05 +0100 (CET) From: Jim Meyering To: "Voelker\, Bernhard" Subject: Re: bug#10819: [BUG][RM] In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> (Bernhard Voelker's message of "Thu, 16 Feb 2012 11:17:16 +0100") References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> Date: Thu, 16 Feb 2012 11:59:05 +0100 Message-ID: <878vk3qc1y.fsf@rho.meyering.net> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Voelker, Bernhard wrote: > Jim Meyering wrote: >> Davide Brini wrote: >> ... >> > At least in bash, but I suppose in other shells too, >> > >> > rm -rf #* >> > >> > treats the "#*" part as a comment, and (if you remove the "-f") complains >> > about missing operand to rm. >> >> That is the default, but for an interactive shell, >> that behavior can be changed: >> >> $ echo a b # c >> a b >> $ shopt -u interactive_comments >> $ echo a b # c >> a b # c > > I think Davide's point is not about the # comment ... rm won't see > that on argv anyway. The point is that 'rm -f' does not complain about > missing operands while 'rm' does: > > $ rm > rm: missing operand > Try `rm --help' for more information. > $ rm -f > $ > > According to the info, '-f' just silences error messages for files > which do not exist (and never to prompt for confirmation), but why > should it also affect the "missing operand" message? Two reasons: - that's what rm -f has always done - because that's more useful. Otherwise, "rm -rf $file_list" would have to be wrapped in code to handle specially the case in which $file_list is empty. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 07:34:04 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 12:34:04 +0000 Received: from localhost ([127.0.0.1]:42296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry0XA-0006XH-7e for submit@debbugs.gnu.org; Thu, 16 Feb 2012 07:34:04 -0500 Received: from senmx11-mx.siemens-enterprise.com ([62.134.46.9]:36287) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry0X3-0006Wz-3P for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 07:33:58 -0500 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx11-mx.siemens-enterprise.com (Server) with ESMTP id 3CFA11EB8478; Thu, 16 Feb 2012 13:31:59 +0100 (CET) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Thu, 16 Feb 2012 13:31:59 +0100 From: "Voelker, Bernhard" To: Jim Meyering Date: Thu, 16 Feb 2012 13:31:59 +0100 Subject: RE: bug#10819: [BUG][RM] Thread-Topic: bug#10819: [BUG][RM] Thread-Index: AczsmgDDEDXrIjR3Rrqm3wtsNeMAgwAABjEw Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA442@MCHP058A.global-ad.net> References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> In-Reply-To: <878vk3qc1y.fsf@rho.meyering.net> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jim Meyering wrote: > Voelker, Bernhard wrote: >=20 > > I think Davide's point is not about the # comment ... rm won't see > > that on argv anyway. The point is that 'rm -f' does not complain about > > missing operands while 'rm' does: > > > > $ rm > > rm: missing operand > > Try `rm --help' for more information. > > $ rm -f > > $ > > > > According to the info, '-f' just silences error messages for files > > which do not exist (and never to prompt for confirmation), but why > > should it also affect the "missing operand" message? >=20 > Two reasons: >=20 > - that's what rm -f has always done > - because that's more useful. Otherwise, "rm -rf $file_list" would > have to be wrapped in code to handle specially the case in which > $file_list is empty. Good point. That means, the info page could be enhanced to mention that special case (see below). Have a nice day, Berny >From 55d64bcdfdba4726c6e2668066bb25f4bfa6c0b6 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Thu, 16 Feb 2012 13:29:44 +0100 Subject: [PATCH] doc: document 'rm -f' better MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * doc/coreutils.texi (rm invocation): Mention that the option '-f' also silences the message for missing operands which is useful in scripts e.g. for "rm -f $file_list" when $file_list is empty. * src/rm.c (usage): Likewise. Reported by J=E9r=E9my Magrin in http://bugs.gnu.org/10819 --- doc/coreutils.texi | 2 +- src/rm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 02c3a2a..87624c2 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -8769,7 +8769,7 @@ The program accepts the following options. Also see = @ref{Common options}. @itemx --force @opindex -f @opindex --force -Ignore nonexistent files and never prompt the user. +Ignore nonexistent files, missing operands and never prompt the user. Ignore any previous @option{--interactive} (@option{-i}) option. =20 @item -i diff --git a/src/rm.c b/src/rm.c index db525d0..02809f2 100644 --- a/src/rm.c +++ b/src/rm.c @@ -135,7 +135,7 @@ usage (int status) fputs (_("\ Remove (unlink) the FILE(s).\n\ \n\ - -f, --force ignore nonexistent files, never prompt\n\ + -f, --force ignore nonexistent files and arguments, never prom= pt\n\ -i prompt before every removal\n\ "), stdout); fputs (_("\ --=20 1.7.7 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 08:56:27 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 13:56:27 +0000 Received: from localhost ([127.0.0.1]:42378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry1or-0000mF-Q6 for submit@debbugs.gnu.org; Thu, 16 Feb 2012 08:56:26 -0500 Received: from mx.meyering.net ([88.168.87.75]:53555) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry1oi-0000lz-Hm for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 08:56:20 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 3661E6010B; Thu, 16 Feb 2012 14:54:23 +0100 (CET) From: Jim Meyering To: "Voelker\, Bernhard" Subject: Re: bug#10819: [BUG][RM] In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA442@MCHP058A.global-ad.net> (Bernhard Voelker's message of "Thu, 16 Feb 2012 13:31:59 +0100") References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA442@MCHP058A.global-ad.net> Date: Thu, 16 Feb 2012 14:54:23 +0100 Message-ID: <87k43mq3xs.fsf@rho.meyering.net> Lines: 46 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Voelker, Bernhard wrote: > Good point. > That means, the info page could be enhanced to mention that > special case (see below). ... > Subject: [PATCH] doc: document 'rm -f' better > MIME-Version: 1.0 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit > > * doc/coreutils.texi (rm invocation): Mention that the option '-f' also > silences the message for missing operands which is useful in scripts > e.g. for "rm -f $file_list" when $file_list is empty. > * src/rm.c (usage): Likewise. > Reported by J=E9r=E9my Magrin in http://bugs.gnu.org/10819 ... Thanks. I've applied that with these tweaks: doc: improve 'rm -f' description diff --git a/THANKS.in b/THANKS.in index 904bb3e..c8dd75f 100644 --- a/THANKS.in +++ b/THANKS.in @@ -276,6 +276,7 @@ Jens Elkner elkner@imsgroup.de Jens Schmidt jms@jsds.hamburg.com Jeph Cowan jeph@ucar.edu Jeremy Maitin-Shepard jbms@cmu.edu +J=E9r=E9my Magrin jeremy.magrin@epitech.eu Jerome Abela abela@hsc.fr J=E9r=F4me Zago bug-coreutils-ml@agt-the-walker.net Jesse Kornblum kornblum@usna.edu diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 87624c2..8c6a287 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -8769,7 +8769,7 @@ rm invocation @itemx --force @opindex -f @opindex --force -Ignore nonexistent files, missing operands and never prompt the user. +Ignore nonexistent files and missing operands, and never prompt the user. Ignore any previous @option{--interactive} (@option{-i}) option. @item -i From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 09:54:54 2012 Received: (at 10819-done) by debbugs.gnu.org; 16 Feb 2012 14:54:54 +0000 Received: from localhost ([127.0.0.1]:42452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry2jW-0002tY-0E for submit@debbugs.gnu.org; Thu, 16 Feb 2012 09:54:54 -0500 Received: from senmx11-mx.siemens-enterprise.com ([62.134.46.9]:41319) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry2jT-0002tM-If for 10819-done@debbugs.gnu.org; Thu, 16 Feb 2012 09:54:52 -0500 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx11-mx.siemens-enterprise.com (Server) with ESMTP id 4ADFB1EB83F7; Thu, 16 Feb 2012 15:52:57 +0100 (CET) Received: from MCHP058A.global-ad.net ([172.29.37.55]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Thu, 16 Feb 2012 15:52:57 +0100 From: "Voelker, Bernhard" To: Jim Meyering Date: Thu, 16 Feb 2012 15:52:57 +0100 Subject: RE: bug#10819: [BUG][RM] Thread-Topic: bug#10819: [BUG][RM] Thread-Index: Aczssn+X62CJMhwkT3K+o0zBkr111AABlTIg Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA572@MCHP058A.global-ad.net> References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA442@MCHP058A.global-ad.net> <87k43mq3xs.fsf@rho.meyering.net> In-Reply-To: <87k43mq3xs.fsf@rho.meyering.net> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819-done Cc: "10819-done@debbugs.gnu.org" <10819-done@debbugs.gnu.org>, Davide Brini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 10819 fixed thanks Jim Meyering wrote: > Voelker, Bernhard wrote: > > Good point. > > That means, the info page could be enhanced to mention that > > special case (see below). > ... > > Subject: [PATCH] doc: document 'rm -f' better > Thanks. I've applied that with these tweaks: Even better, thank you. Marking it as done. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 09:59:43 2012 Received: (at 10819-done) by debbugs.gnu.org; 16 Feb 2012 14:59:43 +0000 Received: from localhost ([127.0.0.1]:42708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry2o6-00033d-GT for submit@debbugs.gnu.org; Thu, 16 Feb 2012 09:59:42 -0500 Received: from mx.meyering.net ([88.168.87.75]:53757) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry2o4-00033W-Dg for 10819-done@debbugs.gnu.org; Thu, 16 Feb 2012 09:59:37 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 1339C60064; Thu, 16 Feb 2012 15:57:47 +0100 (CET) From: Jim Meyering To: "Voelker\, Bernhard" Subject: Re: bug#10819: [BUG][RM] In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA572@MCHP058A.global-ad.net> (Bernhard Voelker's message of "Thu, 16 Feb 2012 15:52:57 +0100") References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA442@MCHP058A.global-ad.net> <87k43mq3xs.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA572@MCHP058A.global-ad.net> Date: Thu, 16 Feb 2012 15:57:46 +0100 Message-ID: <871upuq105.fsf@rho.meyering.net> Lines: 8 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819-done Cc: "10819-done@debbugs.gnu.org" <10819-done@debbugs.gnu.org>, Davide Brini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Voelker, Bernhard wrote: ... > tags 10819 fixed > thanks ... > Marking it as done. Thank you. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 10:30:24 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 15:30:24 +0000 Received: from localhost ([127.0.0.1]:42731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry3Ho-0004Xq-6n for submit@debbugs.gnu.org; Thu, 16 Feb 2012 10:30:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38630) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry3Hh-0004Xc-Dh for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 10:30:18 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1GFSNVE002280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Feb 2012 10:28:23 -0500 Received: from [10.3.113.140] (ovpn-113-140.phx2.redhat.com [10.3.113.140]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1GFSMTR002239; Thu, 16 Feb 2012 10:28:22 -0500 Message-ID: <4F3D2095.3000105@redhat.com> Date: Thu, 16 Feb 2012 08:28:21 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#10819: [BUG][RM] References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> In-Reply-To: <878vk3qc1y.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.5 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig196E6EAB163F709FFB5C1118" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini , "Voelker, Bernhard" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig196E6EAB163F709FFB5C1118 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/16/2012 03:59 AM, Jim Meyering wrote: >> I think Davide's point is not about the # comment ... rm won't see >> that on argv anyway. The point is that 'rm -f' does not complain about= >> missing operands while 'rm' does: >> >> $ rm >> rm: missing operand >> Try `rm --help' for more information. >> $ rm -f >> $ >> >> According to the info, '-f' just silences error messages for files >> which do not exist (and never to prompt for confirmation), but why >> should it also affect the "missing operand" message? >=20 > Two reasons: >=20 > - that's what rm -f has always done > - because that's more useful. Otherwise, "rm -rf $file_list" would > have to be wrapped in code to handle specially the case in which > $file_list is empty. You can always use 'rm -rf dummy $file_list' without having to check for whether $file_list is empty, but yes, that is the primary reasoning why -f with no options behaves differently than any other case with no option= s. FYI: I just opened a POSIX bug report, asking that this usage be codified (since everyone that I tested already does it): http://austingroupbugs.net/view.php?id=3D542 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig196E6EAB163F709FFB5C1118 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPPSCWAAoJEKeha0olJ0Nql/oH/3NL4/qG+59KSgP7hTTCtKzx G8+nC7RvyBRm80kALiIE6BweVIUGdiGeJiD+mHWqLJnNBQPYS6KrOxtMqATRrIT8 h98qrL6/TiNIMwy73+HQgtXCntCp0zKN9Q7A0V2jKd33J002Cn14ITlEupN/yKX0 WSp147Aak0jeGH99PWzRac6ZZmQxHtG6Bjw5Suc+UWjnqwRzmYyJ/vL5l++gT1OB EXo0f/1+ORebSzNeNBDk6hQ5RaRx10XP3Bi7SqAgE2aZd72kzrxxttgZzID8jKP1 LwofyVQrEPgmlsTTrH9GpOvenNRj01pUfrM9aKuO4ib/AByQY+cj5QZaTZbZxv0= =8O0q -----END PGP SIGNATURE----- --------------enig196E6EAB163F709FFB5C1118-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 12:06:24 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 17:06:24 +0000 Received: from localhost ([127.0.0.1]:42759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry4mh-0006lR-Eu for submit@debbugs.gnu.org; Thu, 16 Feb 2012 12:06:23 -0500 Received: from mx.meyering.net ([88.168.87.75]:54152) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry4mb-0006lG-UH for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 12:06:18 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id DC65160064; Thu, 16 Feb 2012 18:04:23 +0100 (CET) From: Jim Meyering To: Eric Blake Subject: Re: bug#10819: [BUG][RM] In-Reply-To: <4F3D2095.3000105@redhat.com> (Eric Blake's message of "Thu, 16 Feb 2012 08:28:21 -0700") References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <4F3D2095.3000105@redhat.com> Date: Thu, 16 Feb 2012 18:04:23 +0100 Message-ID: <87k43mogko.fsf@rho.meyering.net> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini , "Voelker, Bernhard" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Eric Blake wrote: > On 02/16/2012 03:59 AM, Jim Meyering wrote: >>> I think Davide's point is not about the # comment ... rm won't see >>> that on argv anyway. The point is that 'rm -f' does not complain about >>> missing operands while 'rm' does: >>> >>> $ rm >>> rm: missing operand >>> Try `rm --help' for more information. >>> $ rm -f >>> $ >>> >>> According to the info, '-f' just silences error messages for files >>> which do not exist (and never to prompt for confirmation), but why >>> should it also affect the "missing operand" message? >> >> Two reasons: >> >> - that's what rm -f has always done >> - because that's more useful. Otherwise, "rm -rf $file_list" would >> have to be wrapped in code to handle specially the case in which >> $file_list is empty. > > You can always use 'rm -rf dummy $file_list' without having to check for That would have an undesirable side-effect if ./dummy happens to exist. > whether $file_list is empty, but yes, that is the primary reasoning why > -f with no options behaves differently than any other case with no options. > > FYI: I just opened a POSIX bug report, asking that this usage be Thanks. I noticed the lack upon a cursory reading while writing the reasons above (wanted to add "because POSIX requires it"), but hadn't made time to go back and confirm. > codified (since everyone that I tested already does it): > http://austingroupbugs.net/view.php?id=542 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 13:41:09 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 18:41:09 +0000 Received: from localhost ([127.0.0.1]:42795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry6GO-0000Y4-I8 for submit@debbugs.gnu.org; Thu, 16 Feb 2012 13:41:09 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:45730) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry6GI-0000XX-K6 for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 13:41:03 -0500 Received: by lahl5 with SMTP id l5so2728119lah.3 for <10819@debbugs.gnu.org>; Thu, 16 Feb 2012 10:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=dkwldG3N+TQ9CxJxN5iuKQ0PWSL+yILC+wdpthgtYi0=; b=pYZdQ90EcG0uc0OGVInzBrPP9RFz1TIdvxDamVmRhCIh+JdCWOmIbuOJdShelVoLI9 eswNqFeqzF7Em9i6k+Wgk7EYPZ74ODrQfqXhENXSgoYzFyFuJaKmOKf2hA4YuLTDUAPH V1329UgTSXpP0ArUez+hLDg11kSEem3NtY8tU= Received: by 10.112.99.106 with SMTP id ep10mr1379937lbb.68.1329417543492; Thu, 16 Feb 2012 10:39:03 -0800 (PST) Received: from [79.24.98.47] (host47-98-dynamic.24-79-r.retail.telecomitalia.it. [79.24.98.47]) by mx.google.com with ESMTPS id od2sm6979127lab.11.2012.02.16.10.39.00 (version=SSLv3 cipher=OTHER); Thu, 16 Feb 2012 10:39:02 -0800 (PST) Message-ID: <4F3D4D41.3010202@gmail.com> Date: Thu, 16 Feb 2012 19:38:57 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10819: [BUG][RM] References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <4F3D2095.3000105@redhat.com> In-Reply-To: <4F3D2095.3000105@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini , Jim Meyering , "Voelker, Bernhard" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hi Eric. On 02/16/2012 04:28 PM, Eric Blake wrote: > > You can always use 'rm -rf dummy $file_list' without having to check for > whether $file_list is empty, but yes, that is the primary reasoning why > -f with no options behaves differently than any other case with no options. > > FYI: I just opened a POSIX bug report, asking that this usage be > codified (since everyone that I tested already does it): > http://austingroupbugs.net/view.php?id=542 > Still, I vaguely recall that there are some 'rm' implementations out there which fails upon "rm -f" (with no arguments); and that's why automake uses the ugly idiom: test -z "$(VAR)" || rm -f $(VAR) in a lot of recipes. Now, I can't tell off-hand which systems those were, nor if they actually exist (and in fact I'd *love* to be proven wrong here, so that we could simplify a bunch of automake recipes); but a more extensive probing is needed in this matter I guess. And if you are right (as I hope), then this 'rm' feature could be documented in the Autoconf manual. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 14:00:37 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 19:00:37 +0000 Received: from localhost ([127.0.0.1]:42800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry6ZE-00014O-MK for submit@debbugs.gnu.org; Thu, 16 Feb 2012 14:00:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14454) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry6Z8-000145-Ct for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 14:00:31 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1GIwUkK014398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Feb 2012 13:58:31 -0500 Received: from [10.3.113.140] (ovpn-113-140.phx2.redhat.com [10.3.113.140]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1GIwUn9020740; Thu, 16 Feb 2012 13:58:30 -0500 Message-ID: <4F3D51D5.8000107@redhat.com> Date: Thu, 16 Feb 2012 11:58:29 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#10819: [BUG][RM] References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <4F3D2095.3000105@redhat.com> <4F3D4D41.3010202@gmail.com> In-Reply-To: <4F3D4D41.3010202@gmail.com> X-Enigmail-Version: 1.3.5 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig79715F3BABA03048B4A85AED" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, Davide Brini , "bug-autoconf@gnu.org" , Jim Meyering , "Voelker, Bernhard" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig79715F3BABA03048B4A85AED Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/16/2012 11:38 AM, Stefano Lattarini wrote: >> FYI: I just opened a POSIX bug report, asking that this usage be >> codified (since everyone that I tested already does it): >> http://austingroupbugs.net/view.php?id=3D542 By the way, that bug report was accepted in today's Austin Group meeting, so it will be a POSIX requirement whenever Technical Corrigendum 2 is released :) >> > Still, I vaguely recall that there are some 'rm' implementations out th= ere > which fails upon "rm -f" (with no arguments); and that's why automake u= ses > the ugly idiom: >=20 > test -z "$(VAR)" || rm -f $(VAR) >=20 > in a lot of recipes. Now, I can't tell off-hand which systems those we= re, > nor if they actually exist (and in fact I'd *love* to be proven wrong h= ere, As would I. My tests were pretty extensive, hitting some rather old machines: FreeBSD 6.4 AIX 5.1 HP-UX 10.20 IRIX 6.5 Solaris 2.6 (both /bin/rm and /usr/xpg4/bin/rm) Tru64 UNIX 5.1 In all cases, 'rm' gave a usage message and non-zero status, 'rm -f' was silent with status 0. GNU coreutils made the swap back in 1993-03-28 (commit 7735ccac, fileutils 3.8.3b), and if coreutils was the only holdout that caused us to implement that automake verbosity, we can safely say that 19 years is long enough to consider the problem long dead. > so that we could simplify a bunch of automake recipes); but a more exte= nsive > probing is needed in this matter I guess. And if you are right (as I h= ope), > then this 'rm' feature could be documented in the Autoconf manual. Yep, I think that's appropriate, as it is unlikely that we will come up with any counterexamples any time soon. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig79715F3BABA03048B4A85AED Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPPVHVAAoJEKeha0olJ0NqafEH/izoWjflPYUEFyP4f/mU7WjF VBPtzh5DCsqwbsd2TohTasg6BkVxPzzv0nuhHh2j/GiJRFiPD4G4P5lN3IPXvyoU Gyq/JqUW6WrPEgrkDvjEslFLVtM1/HfaV4T/STqj8flY2ZZubNNo9TBwWILBJ9P5 bi26nblkVzs/49FIDwEcSC6kynxvRFPvPsYoCcpjGXnTd2pKHOAP2VcPIQaJfdwi I/qUt3H+pnap0GrHIPKA0UiSPnZ7lmGKnRwZxqwnGi75HwOFl7rUFwDAVu7toXsq ZWsSKDmot+5uACOOq9ChrGC6BDq1TCCSKM4en4ho2RTC8wZsFT9g8Cqrwwx1/3U= =lAsY -----END PGP SIGNATURE----- --------------enig79715F3BABA03048B4A85AED-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 14:41:41 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 19:41:41 +0000 Received: from localhost ([127.0.0.1]:42867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry7Cw-00023o-Lw for submit@debbugs.gnu.org; Thu, 16 Feb 2012 14:41:40 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45247) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry6pH-0001RU-J5 for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 14:17:14 -0500 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id DB4AB2101B for <10819@debbugs.gnu.org>; Thu, 16 Feb 2012 14:15:17 -0500 (EST) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 16 Feb 2012 14:15:17 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=dimebar.com; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=brtJatXg29wjwBiYzEJJ79CNYck=; b=iDy0ZUwG6VqWeuHXEwFV2zr3R2ql 9C2d+iITBTvmkkmTcHJpJjiaEWVf1UrZRJDm6/yQpQD6ryIZZokfAPVxosKstnMX 0URSVYwlUmnGsDgcT8HIneFoOkZcpDeZoavM5ypwdvE5XWXu5jJllBRAG3Y/ucCr +nlpPqrKITpYfy0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=brtJatXg29wjwBiYzEJJ79 CNYck=; b=aiwlSSXgsqDLOCjzAocYl0JgyR0aSq5nn6AFG8jwvuBANjwswrq9S2 DGL+Wb2ZaTQ4IBSyTdVLypEo/B2unIc7BR0vv1yQg0yQoCgKRQKoNqT059TAAZs9 Youg3DMuyCl/lycz2R9a/yJ1u0A2LpJt8/suNA33rZyDHYDgyje5Y= X-Sasl-enc: VJbpYqdGDzmCytD0H72mFohDBO3wmEoDz/AypAnj+rAX 1329419717 Received: from [192.168.1.86] (188-223-86-200.zone14.bethere.co.uk [188.223.86.200]) by mail.messagingengine.com (Postfix) with ESMTPSA id 32C634824B5; Thu, 16 Feb 2012 14:15:15 -0500 (EST) Message-ID: <4F3D55C2.6070900@dimebar.com> Date: Thu, 16 Feb 2012 19:15:14 +0000 From: Philip Rowlands User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111220 Thunderbird/9.0 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#10819: [BUG][RM] References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <4F3D2095.3000105@redhat.com> <4F3D4D41.3010202@gmail.com> <4F3D51D5.8000107@redhat.com> In-Reply-To: <4F3D51D5.8000107@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10819 X-Mailman-Approved-At: Thu, 16 Feb 2012 14:41:33 -0500 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, "bug-autoconf@gnu.org" , Jim Meyering , Davide Brini , Stefano Lattarini , "Voelker, Bernhard" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 16/02/2012 18:58, Eric Blake wrote: >> so that we could simplify a bunch of automake recipes); but a more extensive >> probing is needed in this matter I guess. And if you are right (as I hope), >> then this 'rm' feature could be documented in the Autoconf manual. > > Yep, I think that's appropriate, as it is unlikely that we will come up > with any counterexamples any time soon. As the now-POSIX-infringing behaviour is simple to detect, couldn't automake detect it early and die with a helpful message, or is that contrary to its philosophy? Cheers, Phil From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 16 15:43:16 2012 Received: (at 10819) by debbugs.gnu.org; 16 Feb 2012 20:43:16 +0000 Received: from localhost ([127.0.0.1]:42946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry8AZ-0003Tx-LI for submit@debbugs.gnu.org; Thu, 16 Feb 2012 15:43:15 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]:50448) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ry8AT-0003TL-EB for 10819@debbugs.gnu.org; Thu, 16 Feb 2012 15:43:09 -0500 Received: by eaal12 with SMTP id l12so1467760eaa.3 for <10819@debbugs.gnu.org>; Thu, 16 Feb 2012 12:41:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=WWfCRbdLpLkKFWQt+csgVouiwXuVGBoB1+Je/xJZrqQ=; b=CtOawwPIKbrIHVVwMoMbtLUtN7Bb8EtgUYVbkEf78R45ePwQiEWjB9gHuADiTNB4m0 +t1MpsCANwtRsw6wHJUXoO1skxkQnxe+dqFDmydpJzch0kUOoZUUOpFLBJuy0cnwspCi Fyw4CDIEPa7T5u7mi8OW/j8xkb7IG82Ci98bU= Received: by 10.112.9.40 with SMTP id w8mr1510036lba.103.1329424869737; Thu, 16 Feb 2012 12:41:09 -0800 (PST) Received: from [82.56.31.53] (host53-31-dynamic.56-82-r.retail.telecomitalia.it. [82.56.31.53]) by mx.google.com with ESMTPS id od2sm7340288lab.11.2012.02.16.12.41.06 (version=SSLv3 cipher=OTHER); Thu, 16 Feb 2012 12:41:08 -0800 (PST) Message-ID: <4F3D69DF.6000602@gmail.com> Date: Thu, 16 Feb 2012 21:41:03 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Philip Rowlands Subject: POSIX will say running "rm -f" with no argument is OK References: <4F3BC9C7.3060204@epitech.eu> <4F3C2C4D.4060004@redhat.com> <87pqdfqikf.fsf@rho.meyering.net> <7856072A9D04C24B82DFE2B1112FE38A0D8E3EA35E@MCHP058A.global-ad.net> <878vk3qc1y.fsf@rho.meyering.net> <4F3D2095.3000105@redhat.com> <4F3D4D41.3010202@gmail.com> <4F3D51D5.8000107@redhat.com> <4F3D55C2.6070900@dimebar.com> In-Reply-To: <4F3D55C2.6070900@dimebar.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10819 Cc: "10819@debbugs.gnu.org" <10819@debbugs.gnu.org>, "bug-autoconf@gnu.org" , Jim Meyering , Davide Brini , bug-automake@gnu.org, Eric Blake , "Voelker, Bernhard" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Severity: wishlist [CC:ing bug-automake, so that we won't forget about this issue] Reference: POSIX will say in a future version that running "rm -f" with no argument is OK; we might simplify several automake-generated "cleaning" rules accordingly, to get rid of the awful idiom: test -z "$(VAR)" || rm -f $(VAR) On 02/16/2012 08:15 PM, Philip Rowlands wrote: > On 16/02/2012 18:58, Eric Blake wrote: > >>> so that we could simplify a bunch of automake recipes); but a more extensive >>> probing is needed in this matter I guess. And if you are right (as I hope), >>> then this 'rm' feature could be documented in the Autoconf manual. >> >> Yep, I think that's appropriate, as it is unlikely that we will come up >> with any counterexamples any time soon. > > As the now-POSIX-infringing behaviour is simple to detect, couldn't automake detect > it early and die with a helpful message, or is that contrary to its philosophy? > Well, that might be an overkill, since it appears that all the non-museum implementations of 'rm' have the behaviour we want. But I agree that, in case we ever stumble upon a system violating this new expectation, adding proper configure-time probing and warning might be helpful (and might convince the users of such an inferior system to start using GNU coreutils). Regards, Stefano From unknown Tue Jun 17 01:47:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 16 Mar 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator