[packages/python-setuptools] adapter, use realtive symlink

Elan Ruusamäe glen at pld-linux.org
Sun Nov 29 10:48:45 CET 2015


On 28.11.2015 17:36, Jacek Konieczny wrote:
> On 2015-11-28 15:16, glen wrote:
>> commit b6cbc91d94c8fad86e0ad1b271429f6772218700
>> Author: Elan Ruusamäe <glen at delfi.ee>
>> Date:   Sat Nov 28 16:16:47 2015 +0200
>>
>>      adapter, use realtive symlink
> [...]
>
>> -ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py3_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install
>> +ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
>>   %else
>> -ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install
>> +ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
>>   %endif
> Why symlink? There was a hard-link for purpose. No need for extra
> redirection. And there are no relative hard links.

symlink is easier to figure out what the file is, py2 or py3 version.
similarily other stuff is symlinked as well when it comes for generic 
name vs versioned name. even python itself:

ls -l /usr/bin/python*
lrwxrwxrwx 1 root root    7 22. nov   09:39 /usr/bin/python -> python2*
lrwxrwxrwx 1 root root   14 22. nov   09:39 /usr/bin/python-config -> 
python2-config*
lrwxrwxrwx 1 root root    3 22. nov   09:39 /usr/bin/python-pip -> pip*
lrwxrwxrwx 1 root root    9 22. nov   09:39 /usr/bin/python2 -> python2.7*
lrwxrwxrwx 1 root root   16 22. nov   09:39 /usr/bin/python2-config -> 
python2.7-config*
-rwxr-xr-x 1 root root 6.0K 31. okt   10:06 /usr/bin/python2.7*
-rwxr-xr-x 1 root root 1.7K 31. okt   10:05 /usr/bin/python2.7-config*


and what's the purpose?

ps: rpm sucks when it comes to accounting free space using hardlinks 
(see some old thread i wrote about git-core)


-- 
glen



More information about the pld-devel-en mailing list