From 192583f964fb86684a9f9d27939c2f417db8ea88 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 25 Feb 2015 17:25:20 +0100 Subject: BUILD: Uninstall also symbolic links to python bindings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make uninstall did not remove symbolic links and make distcheck did not detect it. As a result of this bug another make install failed. cd /usr/lib64/python2.7/site-packages && \ ln -s _py2sss.so pysss.so ; \ ln -s _py2hbac.so pyhbac.so ; \ ln -s _py2sss_murmur.so pysss_murmur.so ; \ ln -s _py2sss_nss_idmap.so pysss_nss_idmap.so ln: failed to create symbolic link ‘pysss.so’: File exists ln: failed to create symbolic link ‘pyhbac.so’: File exists ln: failed to create symbolic link ‘pysss_murmur.so’: File exists ln: failed to create symbolic link ‘pysss_nss_idmap.so’: File exists Makefile:19361: recipe for target 'install-exec-hook' failed make[4]: *** [install-exec-hook] Error 1 This patch also use argument "-f" with command ln which remove existing destination files before creating symbolic link Reviewed-by: Pavel Reichl --- Makefile.am | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8f0ce4be..434f28f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3124,10 +3124,10 @@ if BUILD_PYTHON2_BINDINGS --record=$(abs_builddir)/src/config/.files2 --root=$(DESTDIR); \ fi cd $(DESTDIR)$(py2execdir) && \ - $(LN_S) _py2sss.so pysss.so ; \ - $(LN_S) _py2hbac.so pyhbac.so ; \ - $(LN_S) _py2sss_murmur.so pysss_murmur.so ; \ - $(LN_S) _py2sss_nss_idmap.so pysss_nss_idmap.so + $(LN_S) -f _py2sss.so pysss.so ; \ + $(LN_S) -f _py2hbac.so pyhbac.so ; \ + $(LN_S) -f _py2sss_murmur.so pysss_murmur.so ; \ + $(LN_S) -f _py2sss_nss_idmap.so pysss_nss_idmap.so endif if BUILD_PYTHON3_BINDINGS if [ "$(DESTDIR)" = "" ]; then \ @@ -3142,10 +3142,10 @@ if BUILD_PYTHON3_BINDINGS --record=$(abs_builddir)/src/config/.files3 --root=$(DESTDIR); \ fi cd $(DESTDIR)$(py3execdir) && \ - $(LN_S) _py3sss.so pysss.so ; \ - $(LN_S) _py3hbac.so pyhbac.so ; \ - $(LN_S) _py3sss_murmur.so pysss_murmur.so ; \ - $(LN_S) _py3sss_nss_idmap.so pysss_nss_idmap.so + $(LN_S) -f _py3sss.so pysss.so ; \ + $(LN_S) -f _py3hbac.so pyhbac.so ; \ + $(LN_S) -f _py3sss_murmur.so pysss_murmur.so ; \ + $(LN_S) -f _py3sss_nss_idmap.so pysss_nss_idmap.so endif for doc in $(SSSD_DOCS); do \ $(MKDIR_P) $$doc $(DESTDIR)/$(docdir); \ @@ -3190,6 +3190,14 @@ uninstall-hook: for doc in $(SSSD_DOCS); do \ rm -Rf $(DESTDIR)/$(docdir)/$$doc; \ done; +if BUILD_PYTHON2_BINDINGS + cd $(DESTDIR)$(py2execdir) && \ + rm -f pysss.so pyhbac.so pysss_murmur.so pysss_nss_idmap.so +endif +if BUILD_PYTHON3_BINDINGS + cd $(DESTDIR)$(py3execdir) && \ + rm -f pysss.so pyhbac.so pysss_murmur.so pysss_nss_idmap.so +endif clean-local: if BUILD_PYTHON2_BINDINGS -- cgit