]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: Overwrite existing symbolic links
authorAndrea Bolognani <abologna@redhat.com>
Wed, 20 Apr 2016 16:33:20 +0000 (18:33 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 21 Apr 2016 08:02:36 +0000 (10:02 +0200)
The current rule fails if the target already exists:

  cd /home/jenkins/build/libvirt/lib && \
    ln -s libnss_libvirt.so.1 nss_libvirt.so.1
  ln: nss_libvirt.so.1: File exists
  Makefile:3357: recipe for target 'install-exec-hook' failed

However, all other rules concerned with installation are
idempotent and will happily overwrite an existing target,
so this one should as well.

src/Makefile.am
tools/Makefile.am

index 03806952e90012f7dea15d09d65895a093e4cb89..016817768b1fa107c99377e190275095287dce2d 100644 (file)
@@ -3078,8 +3078,7 @@ if WITH_NETWORK
            cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
              $(DESTDIR)$(confdir)/qemu/networks/default.xml && \
            rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; }
-       test -e $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml || \
-          $(LN_S) ../default.xml \
+       $(LN_S) -f ../default.xml \
            $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
 endif WITH_NETWORK
 
index c474d750cbd51dfe571ca6b893ef252a4f407e39..7f2c0fcea9a7e1b8880714e46d65d448e9fc3e18 100644 (file)
@@ -424,7 +424,7 @@ NSS_SO_VER = 1
 
 install-exec-hook:
        cd $(DESTDIR)$(libdir) && \
-         $(LN_S) libnss_libvirt.so.$(NSS_SO_VER) nss_libvirt.so.$(NSS_SO_VER)
+         $(LN_S) -f libnss_libvirt.so.$(NSS_SO_VER) nss_libvirt.so.$(NSS_SO_VER)
 
 uninstall-local:
        -rm -f $(DESTDIR)$(libdir)/nss_libvirt.so.$(NSS_SO_VER)