From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [37.140.190.203]) by sourceware.org (Postfix) with ESMTPS id 2056C3858C39 for ; Mon, 22 Aug 2022 18:50:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2056C3858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru Received: from myt5-89cdf5c4a3a5.qloud-c.yandex.net (myt5-89cdf5c4a3a5.qloud-c.yandex.net [IPv6:2a02:6b8:c12:289b:0:640:89cd:f5c4]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 5EBCC45C424B for ; Mon, 22 Aug 2022 21:50:01 +0300 (MSK) Received: by myt5-89cdf5c4a3a5.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 9wiKWOXxWw-o0h4kFWD; Mon, 22 Aug 2022 21:50:01 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1661194201; bh=4l4TWHox8ERqnDyv+mzhV+dzfMPPA2ftfveRxMrhJMo=; h=In-Reply-To:Subject:Date:References:To:Message-ID:Reply-To:From; b=N/Sy1CFKFwGKacM6DXHIWHtZmTrtbEQGpSomyCo4mFRV8dxgF+PX0SyWRmS4gpeVN nICTHRT5PGYaizE4J9yXWKoUlxMWQj5p+E/R1ywYlDwyBB1R8P48wllipVoFwCToka B1X/2/2P2uGxUy6wk6yDKQyE3n3/hi+W/IBxBqCs= Authentication-Results: myt5-89cdf5c4a3a5.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Mon, 22 Aug 2022 18:43:14 -0000 Date: Mon, 22 Aug 2022 21:43:14 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Reply-To: cygwin@cygwin.com Message-ID: <1374387774.20220822214314@yandex.ru> To: Andrey Repin , cygwin@cygwin.com Subject: Re: Broken links in Cygwin installation In-Reply-To: <1755994279.20220822191254@yandex.ru> References: <1839725171.20220821144244@yandex.ru> <1755994279.20220822191254@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2022 18:50:04 -0000 Greetings, Andrey Repin! > Small background: I've been moving my Cygwin installations around to match > path locations between different systems. I've ended up with a lot of broken > symlinks, between which some are actually lost. > I've baked a PowerShell script to solve the issue (see attachment). > Also in attachment a powershell startup wrapper for /usr/local/bin/ find -L / -xdev -type l -execdir fixmylinks.ps1 OldPathFragment New\\PathFragment '{}' + In all broken links, script will look for "OldPathFragment", and if replacing the fragment with "New\\PathFragment" produce valid existing path, it will create a new link in place. -- With best regards, Andrey Repin Monday, August 22, 2022 21:38:22 Sorry for my terrible english...