Merge pull request #2630 from MilhouseVH/le90_buildsystem_cleanups

buildsystem: cleanups, use sha256sum for stamp function
This commit is contained in:
CvH
2018-04-02 12:03:24 +02:00
committed by GitHub
6 changed files with 35 additions and 23 deletions

View File

@@ -323,6 +323,14 @@ get_pkg_variable() {
fi
}
calculate_stamp() {
local stamp
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
}
# return 0 if $2 in space-separated list $1, otherwise return 1
listcontains() {
if [ -n "$1" -a -n "$2" ]; then
@@ -502,10 +510,10 @@ build_with_debug() {
[ "${PKG_NAME}" = "debug" ] && return 0
# Build addons with debug if we're building the mediacenter with debug
[ "${PKG_IS_ADDON}" == "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "${MEDIACENTER}" && return 0
[ "${PKG_IS_ADDON}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "${MEDIACENTER}" && return 0
# Build kernel packages with debug if we're building the kernel with debug
[ "${PKG_IS_KERNEL_PKG}" == "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "linux" && return 0
[ "${PKG_IS_KERNEL_PKG}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "linux" && return 0
# Build this package with debug if it's a resolved dependency
listcontains "${_DEBUG_DEPENDS_LIST}" "${PKG_NAME}" && return 0
@@ -889,7 +897,7 @@ debug_strip() {
print_color() {
local clr_name="$1" clr_text="$2" clr_actual
if [ "$DISABLE_COLORS" == "yes" ]; then
if [ "$DISABLE_COLORS" = "yes" ]; then
[ $# -eq 2 ] && echo -en "${clr_text}"
return 0
fi