[SSSD] [PATCH] BUILD: Uninstall also symbolic links to python bindings

Pavel Reichl preichl at redhat.com
Sun Mar 1 10:02:19 UTC 2015


On 02/27/2015 04:54 PM, Lukas Slebodnik wrote:
> On (25/02/15 19:19), Pavel Reichl wrote:
>> On 02/25/2015 05:43 PM, Lukas Slebodnik wrote:
>>> ehlo,
>>>
>>> attached patch should fix PavelR's issue with make install
>>>
>>> LS
>>>
>>>
>> Thanks. It indeed fixes my problem.  Code looks good to me.
>>
>> Only nitpick I noticed is that calling make uninstall twice fails, as there
>> are no file to be unlinked.
>>
>> Would you consider amending the patch?
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 096d422..88a8720 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -3192,17 +3192,17 @@ uninstall-hook:
>>         done;
>> if BUILD_PYTHON2_BINDINGS
>>         cd $(DESTDIR)$(py2execdir) && \
>> -               unlink pysss.so ; \
>> -               unlink pyhbac.so ; \
>> -               unlink pysss_murmur.so ; \
>> -               unlink pysss_nss_idmap.so
>> +               [ ! -e pysss.so ] || unlink pysss.so ; \
>> +               [ ! -e pyhbac.so ] || unlink pyhbac.so ; \
>> +               [ ! -e pysss_murmur.so ] || unlink pysss_murmur.so ; \
>> +               [ ! -e pysss_nss_idmap.so ] || unlink pysss_nss_idmap.so
>> endif
>> if BUILD_PYTHON3_BINDINGS
>>         cd $(DESTDIR)$(py3execdir) && \
>> -               unlink pysss.so ; \
>> -               unlink pyhbac.so ; \
>> -               unlink pysss_murmur.so ; \
>> -               unlink pysss_nss_idmap.so
>> +               [ ! -e pysss.so ] || unlink pysss.so ; \
>> +               [ ! -e pyhbac.so ] || unlink pyhbac.so ; \
>> +               [ ! -e pysss_murmur.so ] || unlink pysss_murmur.so ; \
>> +               [ ! -e pysss_nss_idmap.so ] || unlink pysss_nss_idmap.so
> I'm sorry but that's ugly.
I've never claimed I have a good taste. :-)
>
> I consulted it with our POSIX expert and it is safe to use "rm -f" for removing
> symbolic links.
Works for me. Thanks!
ci: http://sssd-ci.duckdns.org/logs/job/8/47/summary.html

ACK
>
> Updated version is attached.
>
> LS
>
>
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150301/b0cce3a0/attachment.html>


More information about the sssd-devel mailing list