tool/ports: utility for checking port hashes

Our nightly did not detect the current stale hashes because only updated
(in the sense of a changed hash) ports are prepared. Others were left
untouched besides the check_port_source step. Now, check_hash also
checks for missing hash file updates.
This commit is contained in:
Christian Helmuth 2018-04-23 16:52:33 +02:00
parent afcad2a968
commit a496360c5b

39
tool/ports/check_hash Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/make -f
#
# \brief Tool for checking the hash file of a port
# \author Christian Helmuth
# \author Norman Feske
# \date 2018-04-23
#
#
# Determine Genode base directory based on the known location of the
# 'create_builddir' tool within the Genode source tree
#
GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..)
include $(GENODE_DIR)/tool/ports/mk/front_end.inc
include $(GENODE_DIR)/tool/ports/mk/check_port_arg.inc
usage:
@$(ECHO)
@$(ECHO) "--- check hash file of a port ---"
@$(ECHO) "usage: check_hash <port-name>"
@$(ECHO)
include $(PORT)
_DST_HASH_FILE := $(shell mktemp -qt $(firstword tmpXXX.$(TARGET)).hash)
# XXX remove this line when the tool has stabilized
STRICT_HASH ?= no
include $(GENODE_DIR)/tool/ports/mk/hash.inc
check_and_remove: _check_hash
$(VERBOSE)rm -f $(_DST_HASH_FILE)
.PHONY: $(_DST_HASH_FILE)
$(TARGET): check_and_remove