From: Ian Jackson Date: Tue, 31 Dec 2019 15:46:00 +0000 (+0000) Subject: catacomb-import-update: --convert: Check the .mk is unchanged X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=b16a7393b844474e618c58971468e05256d28676;p=secnet.git catacomb-import-update: --convert: Check the .mk is unchanged The .mk lists donor and output files, the relationship between which is primarily recorded in catacomb-import-update, but also encoded in the .mk which is loaded by the makefiles to know what to build and when. This change to --convert detects if the .mk corresponding to this version of the script is different to that which generated the actually-effective one in the import commit. If this check trips, --import must be rerun. Signed-off-by: Ian Jackson --- diff --git a/cat/Dir.sd.mk b/cat/Dir.sd.mk index 5d7c66f..a7be94c 100644 --- a/cat/Dir.sd.mk +++ b/cat/Dir.sd.mk @@ -30,3 +30,5 @@ include &~catacomb-import/secnet-import.auto.mk &~./catacomb-import-update --convert &cat-converted: $(addprefix &~catacomb-import/, $(CATACOMB_IMPORT_DONORS)) + +&CLEAN += & secnet-import.auto.mk.compare diff --git a/catacomb-import-update b/catacomb-import-update index 367609c..2cb3bdc 100755 --- a/catacomb-import-update +++ b/catacomb-import-update @@ -956,6 +956,10 @@ for (my $i = 0; $i < @WANT_TEST; $i += 2) { commit_changes() if !$DOCONVERT; if ($DOCONVERT) { + my $mff2 = "$RECIP_DIR/$MAKEFILE_FRAGMENT.compare"; + write_makefile_fragment($mff2); + runx "diff", "-u", "$DONOR_DIR/$MAKEFILE_FRAGMENT", $mff2; + foreach my $to (@RENAME_LIST) { rename "$to.new", "$to"; }