From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 26 09:20:05 2010 Received: (at submit) by debbugs.gnu.org; 26 Jun 2010 13:20:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSVIi-0002Yt-Jz for submit@debbugs.gnu.org; Sat, 26 Jun 2010 09:20:05 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSSVg-0000et-T4 for submit@debbugs.gnu.org; Sat, 26 Jun 2010 06:21:17 -0400 Received: from lists.gnu.org ([199.232.76.165]:44327) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OSSVe-00013i-Co for submit@debbugs.gnu.org; Sat, 26 Jun 2010 06:21:14 -0400 Received: from [140.186.70.92] (port=52930 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSSVc-0006X3-Nx for bug-coreutils@gnu.org; Sat, 26 Jun 2010 06:21:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSSVb-0003jG-2J for bug-coreutils@gnu.org; Sat, 26 Jun 2010 06:21:12 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:57009) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSSVa-0003jA-W2 for bug-coreutils@gnu.org; Sat, 26 Jun 2010 06:21:11 -0400 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 11BFD1085EE for ; Sat, 26 Jun 2010 06:21:09 -0400 (EDT) Received: from web5.messagingengine.com ([10.202.2.214]) by compute2.internal (MEProxy); Sat, 26 Jun 2010 06:21:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:from:to:mime-version:content-transfer-encoding:content-type:subject:date; s=smtpout; bh=V5ixWp6LvxnEjFtaIAypQSjTtRg=; b=ATJbqpNldA/koCUy7326fbSZdq/J281gxlsY+ljsOUH42IZ8p8MAHiPuFHyWJDOEnklUaTMgf7/hOkIncBj9PY2HQZK5THnkWAo8/UXGGXDOnJt+8pWlTle8OvYbsVo3Qwo4GqGpPQt/aEx7dUtz4yCPzWT3Jq6pNsqYnBgZ4RE= Received: by web5.messagingengine.com (Postfix, from userid 99) id D0A5513C9E2; Sat, 26 Jun 2010 06:21:08 -0400 (EDT) Message-Id: <1277547668.22862.1381993377@webmail.messagingengine.com> X-Sasl-Enc: yLpuEeYxnSxCnCcGSjZ0iucT5P/qvrBEna2sMUk83PRm 1277547668 From: "Benno Schulenberg" To: bug-coreutils@gnu.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1277547668228620" X-Mailer: MessagingEngine.com Webmail Interface Subject: [patch] improving error messages for when 'ln' fails Date: Sat, 26 Jun 2010 12:21:08 +0200 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 26 Jun 2010 09:20:02 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.6 (----) This is a multi-part message in MIME format. --_----------=_1277547668228620 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Date: Sat, 26 Jun 2010 06:21:08 -0400 X-Mailer: MessagingEngine.com Webmail Interface Hi, Trying to make a link that already exists, 'ln' prints a message that is slightly confusing, especially when using '-v' and thus expexting a progress message. For example: $ ln -sv bash /bin/sh ln: creating symbolic link '/bin/sh': File exists The 'creating..." seems to say that the link is being created. The message would be clearer in the following form: ln: cannot create symbolic link '/bin/sh': File exists Attached patch makes this change. Regards, Benno -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow --_----------=_1277547668228620 MIME-Version: 1.0 Content-Disposition: attachment; filename="0001-ln-print-a-clearer-error-message-when-linking-fails.patch" Content-Id: Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="0001-ln-print-a-clearer-error-message-when-linking-fails.patch" X-Mailer: MIME::Lite 3.021 (F2.76; T1.24; A2.03; B3.07_01; Q3.07) Date: Sat, 26 Jun 2010 06:21:08 -0400 RnJvbSAwNTkzOWYzYmY4OTA3ZjlhZTlmMzZkNzJlNTIxZDkzNGM0OWRhZjM3 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBCZW5ubyBTY2h1bGVu YmVyZyA8YmVuc2JlcmdAanVzdGVtYWlsLm5ldD4KRGF0ZTogU2F0LCAyNiBK dW4gMjAxMCAxMjowMDo0MiArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGxuOiBw cmludCBhIGNsZWFyZXIgZXJyb3IgbWVzc2FnZSB3aGVuIGxpbmtpbmcgZmFp bHMKCi0tLQogc3JjL2xuLmMgfCAgIDEwICsrKysrLS0tLS0KIDEgZmlsZXMg Y2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCA1IGRlbGV0aW9ucygtKQoKZGlm ZiAtLWdpdCBhL3NyYy9sbi5jIGIvc3JjL2xuLmMKaW5kZXggODYxMmFmZS4u YmQ1ZjM2MSAxMDA2NDQKLS0tIGEvc3JjL2xuLmMKKysrIGIvc3JjL2xuLmMK QEAgLTMwNCwxNCArMzA0LDE0IEBAIGRvX2xpbmsgKGNvbnN0IGNoYXIgKnNv dXJjZSwgY29uc3QgY2hhciAqZGVzdCkKICAgICAgIGVycm9yICgwLCBlcnJu bywKICAgICAgICAgICAgICAoc3ltYm9saWNfbGluawogICAgICAgICAgICAg ICA/IChlcnJubyAhPSBFTkFNRVRPT0xPTkcgJiYgKnNvdXJjZQotICAgICAg ICAgICAgICAgICA/IF8oImNyZWF0aW5nIHN5bWJvbGljIGxpbmsgJXMiKQot ICAgICAgICAgICAgICAgICA6IF8oImNyZWF0aW5nIHN5bWJvbGljIGxpbmsg JXMgLT4gJXMiKSkKKyAgICAgICAgICAgICAgICAgPyBfKCJjYW5ub3QgY3Jl YXRlIHN5bWJvbGljIGxpbmsgJXMiKQorICAgICAgICAgICAgICAgICA6IF8o ImNhbm5vdCBjcmVhdGUgc3ltYm9saWMgbGluayAlcyAtPiAlcyIpKQogICAg ICAgICAgICAgICA6IChlcnJubyA9PSBFTUxJTksgJiYgIXNvdXJjZV9pc19k aXIKLSAgICAgICAgICAgICAgICAgPyBfKCJjcmVhdGluZyBoYXJkIGxpbmsg dG8gJS4wcyVzIikKKyAgICAgICAgICAgICAgICAgPyBfKCJjYW5ub3QgY3Jl YXRlIGhhcmQgbGluayB0byAlLjBzJXMiKQogICAgICAgICAgICAgICAgICA6 IChlcnJubyA9PSBFRFFVT1QgfHwgZXJybm8gPT0gRUVYSVNUIHx8IGVycm5v ID09IEVOT1NQQwogICAgICAgICAgICAgICAgICAgICB8fCBlcnJubyA9PSBF Uk9GUykKLSAgICAgICAgICAgICAgICAgPyBfKCJjcmVhdGluZyBoYXJkIGxp bmsgJXMiKQotICAgICAgICAgICAgICAgICA6IF8oImNyZWF0aW5nIGhhcmQg bGluayAlcyA9PiAlcyIpKSksCisgICAgICAgICAgICAgICAgID8gXygiY2Fu bm90IGNyZWF0ZSBoYXJkIGxpbmsgJXMiKQorICAgICAgICAgICAgICAgICA6 IF8oImNhbm5vdCBjcmVhdGUgaGFyZCBsaW5rICVzID0+ICVzIikpKSwKICAg ICAgICAgICAgICBxdW90ZV9uICgwLCBkZXN0KSwgcXVvdGVfbiAoMSwgc291 cmNlKSk7CiAKICAgICAgIGlmIChkZXN0X2JhY2t1cCkKLS0gCjEuNi4zLjMK Cg== --_----------=_1277547668228620-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 27 04:06:03 2010 Received: (at 6516-done) by debbugs.gnu.org; 27 Jun 2010 08:06:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSmsN-0001Ik-MF for submit@debbugs.gnu.org; Sun, 27 Jun 2010 04:06:03 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSmsK-0001IO-2O for 6516-done@debbugs.gnu.org; Sun, 27 Jun 2010 04:06:01 -0400 Received: from mx.meyering.net (unknown [82.230.74.64]) by smtp1-g21.free.fr (Postfix) with ESMTP id 3DE989400B3 for <6516-done@debbugs.gnu.org>; Sun, 27 Jun 2010 10:05:51 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id B8B6CDCF9; Sun, 27 Jun 2010 10:05:50 +0200 (CEST) From: Jim Meyering To: "Benno Schulenberg" Subject: Re: bug#6516: [patch] improving error messages for when 'ln' fails In-Reply-To: <1277547668.22862.1381993377@webmail.messagingengine.com> (Benno Schulenberg's message of "Sat, 26 Jun 2010 12:21:08 +0200") References: <1277547668.22862.1381993377@webmail.messagingengine.com> Date: Sun, 27 Jun 2010 10:05:50 +0200 Message-ID: <87bpawrjc1.fsf@meyering.net> Lines: 51 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6516-done Cc: 6516-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.4 (---) Benno Schulenberg wrote: > Trying to make a link that already exists, 'ln' prints a message that > is slightly confusing, especially when using '-v' and thus expexting > a progress message. For example: > > $ ln -sv bash /bin/sh > ln: creating symbolic link '/bin/sh': File exists > > The 'creating..." seems to say that the link is being created. > The message would be clearer in the following form: > > ln: cannot create symbolic link '/bin/sh': File exists ... Thanks. I've changed s/cannot/failed to/ and applied it. $ ./ln ln /xx ./ln: failed to create hard link `/xx' => `ln': Invalid cross-device link [Exit 1] > Subject: [PATCH] ln: print a clearer error message when linking fails > > --- > src/ln.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/ln.c b/src/ln.c > index 8612afe..bd5f361 100644 > --- a/src/ln.c > +++ b/src/ln.c > @@ -304,14 +304,14 @@ do_link (const char *source, const char *dest) > error (0, errno, > (symbolic_link > ? (errno != ENAMETOOLONG && *source > - ? _("creating symbolic link %s") > - : _("creating symbolic link %s -> %s")) > + ? _("cannot create symbolic link %s") > + : _("cannot create symbolic link %s -> %s")) > : (errno == EMLINK && !source_is_dir > - ? _("creating hard link to %.0s%s") > + ? _("cannot create hard link to %.0s%s") > : (errno == EDQUOT || errno == EEXIST || errno == ENOSPC > || errno == EROFS) > - ? _("creating hard link %s") > - : _("creating hard link %s => %s"))), > + ? _("cannot create hard link %s") > + : _("cannot create hard link %s => %s"))), > quote_n (0, dest), quote_n (1, source)); > > if (dest_backup) From unknown Mon Aug 18 15:41:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 25 Jul 2010 11:24:04 +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