Skip to content

Commit

Permalink
build: include package directory in sha256sums when running on buildbot
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jow- committed Jun 27, 2018
1 parent 6e3c2d7 commit 681e825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
fi

checksum: FORCE
$(call sha256sums,$(BIN_DIR))
$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))

diffconfig: FORCE
mkdir -p $(BIN_DIR)
Expand Down
3 changes: 2 additions & 1 deletion rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,9 @@ endef

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

Expand Down

0 comments on commit 681e825

Please sign in to comment.