inspector: Handle write failures when creating example-*.xml.
[libguestfs.git] / images / Makefile.am
index d45e699..4b253a3 100644 (file)
@@ -168,13 +168,22 @@ $(builddir)/test-grep.txt.gz: test-grep.txt
        mv $@-t $@
 
 # Make a (dummy) Fedora image.
-fedora.img: guest-aux/make-fedora-img.sh guest-aux/fedora-name.db
+fedora.img: guest-aux/make-fedora-img.sh \
+               guest-aux/fedora-name.db \
+               guest-aux/fedora-packages.db
        LIBGUESTFS_PATH=../appliance \
        LD_LIBRARY_PATH=../src/.libs \
        bash $<
 
 guest-aux/fedora-name.db: guest-aux/fedora-name.db.txt
-       $(DB_LOAD) $@ < $<
+       rm -f $@ $@-t
+       $(DB_LOAD) $@-t < $<
+       mv $@-t $@
+
+guest-aux/fedora-packages.db: guest-aux/fedora-packages.db.txt
+       rm -f $@ $@-t
+       $(DB_LOAD) $@-t < $<
+       mv $@-t $@
 
 # Make a (dummy) Debian image.
 debian.img: guest-aux/make-debian-img.sh