config/functions: rebuild package when PKG_STAMP has changed

This commit is contained in:
Jonas Karlman 2019-04-01 20:58:13 +00:00
parent 47af2b4d51
commit ddb55a932a

View File

@ -752,11 +752,16 @@ get_pkg_directory() {
}
calculate_stamp() {
local stamp
local stamp data
stamp="$PKG_DIR $PROJECT_DIR/$PROJECT/patches/$PKG_NAME"
[ -n "$DEVICE" ] && stamp+=" $PROJECT_DIR/$PROJECT/devices/$DEVICE/patches/$PKG_NAME"
[ -n "$PKG_NEED_UNPACK" ] && stamp+=" $PKG_NEED_UNPACK"
find ${stamp} -exec sha256sum {} \; 2>/dev/null | sed "s/ ${ROOT//\//\\/}\// /" | sort | sha256sum | cut -d" " -f1
data="$(find ${stamp} -exec sha256sum {} \; 2>/dev/null | sed "s/ ${ROOT//\//\\/}\// /")"
[ -n "${PKG_STAMP}" ] && data+=$'\n'"$(echo "${PKG_STAMP}" | sha256sum)"
echo "${data}" | sort | sha256sum | cut -d" " -f1
}
target_has_feature() {