From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103785 invoked by alias); 14 Jul 2016 13:53:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 103761 invoked by uid 89); 14 Jul 2016 13:53:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-yw0-f193.google.com Received: from mail-yw0-f193.google.com (HELO mail-yw0-f193.google.com) (209.85.161.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 14 Jul 2016 13:53:02 +0000 Received: by mail-yw0-f193.google.com with SMTP id l125so4939417ywb.1 for ; Thu, 14 Jul 2016 06:53:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GA4xugwMot0ke0W7Pss2My1NXOFjd25eNBxYjcVNvx8=; b=ayZ1pmx2Yen586ci6a7uG6jen8u8Zn8e93uQar5ayfu8XXnO1RgARmQ7fqVP7lh/Iw pl4PdJwOWMKRPtVAShu3m71i7VkxMrt/7tDPVoqcZMcvapOBjfiXhevm21M0090JiP9k iUOIYRtvH3iIr5Y5uLA4oZywUEt0glWCoMKAO2Iu9UhIROyWN6Jx9PuGclCGmYGswpnZ NXIqiUwxYoUe6tBYKbkWhrRRuHjtcqBwKJ0Vt0KzsXgZ7H9bEnHKzJlqUNathq6ZHfqh GJTXjbw6j/DPz3svZd8kSi02F86gFoMlvluRIbZOnpqbejC0lICafzwqLbwL2a4KQBRD /0vg== X-Gm-Message-State: ALyK8tLLpf2Gt8kgMr2naJpaEW8yeQR1mH6H1FXVXNT0GvbwDDNhm0Ei3yBBs6keghc5dAAJBZ+p3VejMhglwg== X-Received: by 10.13.254.194 with SMTP id o185mr9689502ywf.124.1468504380850; Thu, 14 Jul 2016 06:53:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.13.23 with HTTP; Thu, 14 Jul 2016 06:52:41 -0700 (PDT) In-Reply-To: <6d8cc2be-c68d-81f9-2274-6a12628b8caa@redhat.com> References: <6d8cc2be-c68d-81f9-2274-6a12628b8caa@redhat.com> From: NightStrike Date: Thu, 14 Jul 2016 13:53:00 -0000 Message-ID: Subject: Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones To: Jeff Law Cc: Eric Gallager , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00829.txt.bz2 On Wed, Jul 13, 2016 at 5:36 PM, Jeff Law wrote: > On 06/27/2016 08:10 PM, Eric Gallager wrote: >> >> The last time I ran ./contrib/download_prerequisites, I already had >> previous symlinks set up from a previous run of the script, so `ln` >> followed the existing symlinks and created the new ones in the >> directories to which the symlinks pointed. This patch should fix that >> by removing the old symlinks before creating new ones. (For some >> reason the `-f` flag to `ln` that was already there wasn't enough for >> me.) Tested by running the script and ensuring that the new isl >> symlink pointed to the correct directory, and that there were no bad >> symlinks in the old isl directory. Could someone commit this trivial >> patch for me, or something like it? I don't have write access. > > I'd really rather know why the "-f" flag didn't work for you. The whole > point of -f is to remove the destination file first. > > Jeff > FWIW, it doesn't work for me, either: $ mkdir d $ ln -s d a $ ls -la a lrwxrwxrwx 1 owner owner 1 Jul 14 09:48 a -> d $ mkdir e $ ln -sf e a $ ls -la a lrwxrwxrwx 1 owner owner 1 Jul 14 09:48 a -> d But adding the -n option does: $ ln -sfn e a $ ls -la a lrwxrwxrwx 1 owner owner 1 Jul 14 09:51 a -> e So perhaps add -n?