Skip to content

Commit 681e825

Browse files
committed
build: include package directory in sha256sums when running on buildbot
In order to be able to better compare files to sync in the future, include all BIN_DIR subdirectories in the checksum calculation. To not break existing applications, restrict the recursive checksumming to CONFIG_BUILDBOT for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
1 parent 6e3c2d7 commit 681e825

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
8585
fi
8686

8787
checksum: FORCE
88-
$(call sha256sums,$(BIN_DIR))
88+
$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
8989

9090
diffconfig: FORCE
9191
mkdir -p $(BIN_DIR)

rules.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ endef
390390

391391
# Calculate sha256sum of any plain file within a given directory
392392
# $(1) => Input directory
393+
# $(2) => If set, recurse into subdirectories
393394
define sha256sums
394-
(cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
395+
(cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
395396
xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
396397
endef
397398

0 commit comments

Comments
 (0)