From 82b486a9086f84447324d68b3c0cae300e0334f7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 3 Apr 2014 16:05:00 +0100 Subject: [PATCH] appliance: Avoid touching appliance/supermin.d directory. We must avoid touching appliance/supermin.d unless it is necessary, so that we avoid unnecessary rebuilds of the full appliance. Unfortunately since we created temporary files there, even if we didn't decide to keep those temporary files they would still end up touching supermin.d. To stop this, move the temporary files out. --- appliance/Makefile.am | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/appliance/Makefile.am b/appliance/Makefile.am index fac24ed73..418a6f6a2 100644 --- a/appliance/Makefile.am +++ b/appliance/Makefile.am @@ -84,17 +84,20 @@ supermin.d/daemon.tar.gz: ../daemon/guestfsd guestfsd.suppressions rm -r tmp-d mv $@-t $@ -supermin.d/excludefiles: excludefiles.in Makefile +# Note we must avoid touching supermin.d if possible, so don't create +# the temporary files inside the supermin.d directory. + +$@supermin.d/excludefiles: excludefiles.in Makefile m4 $(PACKAGELIST_CPP_FLAGS) $< | \ - grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t - cmp -s $@ $@-t || mv $@-t $@ - rm -f $@-t + grep -v '^[[:space:]]*$$' | grep -v '^#' > excludefiles-t + cmp -s $@ excludefiles-t || mv excludefiles-t $@ + rm -f excludefiles-t supermin.d/hostfiles: hostfiles.in Makefile m4 $(PACKAGELIST_CPP_FLAGS) $< | \ - grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t - cmp -s $@ $@-t || mv $@-t $@ - rm -f $@-t + grep -v '^[[:space:]]*$$' | grep -v '^#' > hostfiles-t + cmp -s $@ hostfiles-t || mv hostfiles-t $@ + rm -f hostfiles-t supermin.d/init.tar.gz: init rm -f $@ $@-t