mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #2431 from Kwiboo/pkg-stamp
Add PKG_STAMP to trigger a package rebuild
This commit is contained in:
commit
20eaca6026
@ -760,11 +760,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() {
|
||||
|
@ -11,6 +11,7 @@ PKG_DEPENDS_INIT="toolchain"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_LONGDESC="This package contains a precompiled kernel image and the modules."
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_STAMP="$KERNEL_TARGET $KERNEL_MAKE_EXTRACMD $KERNEL_UBOOT_EXTRA_TARGET"
|
||||
|
||||
PKG_PATCH_DIRS="$LINUX"
|
||||
|
||||
|
@ -9,6 +9,7 @@ PKG_DEPENDS_TARGET="toolchain dtc:host"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
PKG_STAMP="$UBOOT_SYSTEM"
|
||||
|
||||
PKG_NEED_UNPACK="$PROJECT_DIR/$PROJECT/bootloader"
|
||||
[ -n "$DEVICE" ] && PKG_NEED_UNPACK+=" $PROJECT_DIR/$PROJECT/devices/$DEVICE/bootloader"
|
||||
|
@ -49,8 +49,6 @@ if [ -f $STAMP ]; then
|
||||
rm -f $STAMP
|
||||
elif [ ! "$BUILD_WITH_DEBUG" = "$STAMP_BUILD_WITH_DEBUG" ]; then
|
||||
rm -f $STAMP
|
||||
elif [ "${PKG_NAME}" = "u-boot" -a ! "$UBOOT_SYSTEM" = "$STAMP_UBOOT_SYSTEM" ]; then
|
||||
rm -f $STAMP
|
||||
else
|
||||
# stamp matched: already built, do nothing
|
||||
pkg_lock_status "UNLOCK" "${PKG_NAME}:${TARGET}" "build" "already built"
|
||||
@ -502,8 +500,5 @@ PKG_DEEPHASH=$(calculate_stamp)
|
||||
for i in PKG_NAME PKG_DEEPHASH BUILD_WITH_DEBUG; do
|
||||
echo "STAMP_$i=\"${!i}\"" >> $STAMP
|
||||
done
|
||||
if [ "${PKG_NAME}" = "u-boot" ]; then
|
||||
echo "STAMP_UBOOT_SYSTEM=\"${UBOOT_SYSTEM}\"" >> $STAMP
|
||||
fi
|
||||
|
||||
pkg_lock_status "UNLOCK" "${PKG_NAME}:${TARGET}" "build" "built"
|
||||
|
Loading…
x
Reference in New Issue
Block a user