From: Jeff Law <law@redhat.com>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
Eric Gallager <egall@gwmail.gwu.edu>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones
Date: Fri, 22 Jul 2016 22:28:00 -0000 [thread overview]
Message-ID: <11f60f61-1905-ef48-b2fd-e7c78ea7d628@redhat.com> (raw)
In-Reply-To: <AM4PR0701MB216261B83CC541C86A89794AE4090@AM4PR0701MB2162.eurprd07.prod.outlook.com>
On 07/21/2016 12:15 PM, Bernd Edlinger wrote:
> Hi,
>
> > So rather than relying on ln to remove the link, why don't we just
> > explicitly remove it with rm -f?
>
> sounds good, I ran into similar issues already.
>
> ln -nfs does not follow the target if it is a symlink
>
> -n, --no-dereference
> treat LINK_NAME as a normal file if it is a symbolic
> link to a
> directory
>
>
> but I think a simple rm -f will do as well, and avoid potential
> interoperability issues.
>
> However wget has a similar issue, if the $MPFR.tar.gz file is already
> there, maybe incomplete, the wget chooses a new name, so I'd suggest
> to rm -f that file as well, and the whole $MPFR subtree while you are
> already there.
Agreed. And naturally the question is do we bother to check the return
code from the rm -f? I think we should and exit with an error if it fails.
jeff
next prev parent reply other threads:[~2016-07-22 22:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 18:15 Bernd Edlinger
2016-07-22 22:28 ` Jeff Law [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-06-28 2:38 Eric Gallager
2016-07-13 21:36 ` Jeff Law
2016-07-14 10:57 ` Eric Gallager
2016-07-14 13:54 ` NightStrike
2016-07-14 17:24 ` Jeff Law
2016-07-14 19:57 ` Eric Gallager
2016-07-21 17:10 ` Jeff Law
2016-07-21 19:39 ` Eric Gallager
2016-08-03 16:12 ` Jeff Law
2016-07-14 13:53 ` NightStrike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11f60f61-1905-ef48-b2fd-e7c78ea7d628@redhat.com \
--to=law@redhat.com \
--cc=bernd.edlinger@hotmail.de \
--cc=egall@gwmail.gwu.edu \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).