From 1d0a1e79376ae66a970e25a326b34a612e443012 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 22 Feb 2019 12:21:29 +0100 Subject: [PATCH] depot/extract: feed file names into version hash Fixes #3178 --- tool/depot/mk/extract.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tool/depot/mk/extract.inc b/tool/depot/mk/extract.inc index 07f502230..6378df89f 100644 --- a/tool/depot/mk/extract.inc +++ b/tool/depot/mk/extract.inc @@ -193,8 +193,14 @@ _check_hash: $(DEPOT_ARCHIVE_DIR).hash checked_recipe_hash_value_exists # # The command is invoked from within the archive directory within the depot. # +# The hash value depends on both the file names (the first 'find' command) +# found in the archive as well as the content of the files (the second 'find' +# command). +# HASH_CMD := cd $(DEPOT_ARCHIVE_DIR); \ - find . -type f | sort | xargs -d '\n' cat | $(HASHSUM) | sed "s/ .*//" + (find . -type f | sort; \ + find . -type f | sort | xargs -d '\n' cat) \ + | $(HASHSUM) | sed "s/ .*//" # # Generate the hash from the archive content