Broken links in Cygwin installation

Andrey Repin anrdaemon@yandex.ru
Mon Aug 22 16:12:54 GMT 2022


Greetings, Ken Brown!

> On 8/21/2022 7:42 AM, Andrey Repin wrote:
>> Greetings, All!
>> > # LC_ALL=C.UTF-8 find -L / -xdev -type l -exec ls -ld --color '{}' +
>> lrwxrwxrwx 1 anrdaemon None 28 Dec 26  2021 ./bin/rcs2log -> ../share/cvs/contrib/rcs2log
>> lrwxrwxrwx 1 anrdaemon None 15 Nov 10  2021 ./lib/tcl8.6/tclConfig.sh -> ../tclConfig.sh
>> lrwxrwxrwx 1 anrdaemon None 17 Feb  2  2020 ./lib/terminfo -> ../share/terminfo
>> lrwxrwxrwx 1 anrdaemon None 14 Nov 18  2021 ./lib/tk8.6/tkConfig.sh -> ../tkConfig.sh
>> lrwxrwxrwx 1 anrdaemon None 15 Nov 10  2021 ./usr/lib/tcl8.6/tclConfig.sh -> ../tclConfig.sh
>> lrwxrwxrwx 1 anrdaemon None 14 Nov 18  2021 ./usr/lib/tk8.6/tkConfig.sh -> ../tkConfig.sh
>> > Is this… normal ?

> The first four are consequences of the fact that /bin is the same as
> /usr/bin and /lib is the same as /usr/lib.  The links in question were
> actually installed in /usr/bin or /usr/lib.  The package maintainers could
> avoid this issue by using absolute paths instead of relative ones in the
> symlink content, but I don't think it's likely to cause problems in practice.

> The last two symlinks would get resolved if you installed tcl-devel and
> tcl-tk-devel.  I think it's fine to leave dangling symlinks in this situation.

Thanks, Ken! That helped me formulate the solution.

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/


-- 
With best regards,
Andrey Repin
Monday, August 22, 2022 15:49:38

Sorry for my terrible english...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pwsh
Type: application/octet-stream
Size: 119 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20220822/0467530f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fix-Cygwin_64.ps1
Type: application/octet-stream
Size: 1023 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20220822/0467530f/attachment-0001.obj>


More information about the Cygwin mailing list