summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2023-01-12 16:44:29 +0900
committerbiao716.wang <biao716.wang@samsung.com>2023-01-12 16:45:16 +0900
commit6220e4a749c20cd4ad98a88c9de78f6c824cf35e (patch)
treefdac5094b7f5ec2dd49b08842b4a4e71249d22fc
parent139d07f087cc3dafedd99f6cae32a18f6e1d2aa1 (diff)
downloadbuild-6220e4a749c20cd4ad98a88c9de78f6c824cf35e.tar.gz
build-6220e4a749c20cd4ad98a88c9de78f6c824cf35e.tar.bz2
build-6220e4a749c20cd4ad98a88c9de78f6c824cf35e.zip
Add new option: --nocumulate, it can allow build without cumulative build
Change-Id: I786df38e1ff07a29d301c73e38e58c1338816672 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
-rw-r--r--build10
-rw-r--r--build-pkg-rpm12
-rwxr-xr-xinit_buildsystem5
3 files changed, 17 insertions, 10 deletions
diff --git a/build b/build
index 374ebc9..1380265 100644
--- a/build
+++ b/build
@@ -102,6 +102,7 @@ CACHE_DIR=/var/cache/build
USEHIGHERDEPS=
PKG_CCACHE=
CCACHE_SETUP_START_TIME=
+NOCUMULATE=
# This is for insserv
export YAST_IS_RUNNING=instsys
@@ -354,6 +355,8 @@ Known Parameters:
(This options in kvm can not guarantee reproducible builds)
--debug
Enable creation of a debuginfo package
+ --nocumulate
+ Enable build without cumulative build.
Remember to have fun!
@@ -918,6 +921,9 @@ while test -n "$1"; do
test "$icecream" -gt 0 && BUILD_JOBS="$ARG"
shift
;;
+ -nocumulate)
+ NOCUMULATE="--nocumulate"
+ ;;
-ccache)
CCACHE=true
;;
@@ -1069,7 +1075,7 @@ if test -n "$LIST_STATE" ; then
recipe_unpack_srcrpm
RECIPEFILE="$MYSRCDIR/$RECIPEFILE"
fi
- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" --list-state "${definesnstuff[@]}" "${repos[@]}" $DLNOSIGNATURE $KEEP_PACKS $USEHIGHERDEPS $USEUSEDFORBUILD $RECIPEFILE $BUILD_EXTRA_PACKS
+ init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" --list-state "${definesnstuff[@]}" "${repos[@]}" $DLNOSIGNATURE $KEEP_PACKS $NOCUMULATE $USEHIGHERDEPS $USEUSEDFORBUILD $RECIPEFILE $BUILD_EXTRA_PACKS
ERR=$?
rm -rf "$BUILD_ROOT"
cleanup_and_exit $ERR
@@ -1220,7 +1226,7 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; do
test "$BUILDTYPE" = debootstrap && CREATE_BUILD_BINARIES=--create-build-binaries
test "$BUILDTYPE" = livebuild && CREATE_BUILD_BINARIES=--create-build-binaries
test "$BUILDTYPE" = snapcraft && CREATE_BUILD_BINARIES=--create-build-binaries
- set -- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $DLNOSIGNATURE $KEEP_PACKS $USEHIGHERDEPS $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST "$MYSRCDIR/$RECIPEFILE" $ADDITIONAL_PACKS
+ set -- init_buildsystem --configdir "$CONFIG_DIR" --cachedir "$CACHE_DIR" "${definesnstuff[@]}" "${repos[@]}" $CLEAN_BUILD $DLNOSIGNATURE $KEEP_PACKS $NOCUMULATE $USEHIGHERDEPS $USEUSEDFORBUILD $CREATE_BUILD_BINARIES $RPMLIST "$MYSRCDIR/$RECIPEFILE" $ADDITIONAL_PACKS
echo "$* ..."
start_time=`date +%s`
"$@" || cleanup_and_exit 1
diff --git a/build-pkg-rpm b/build-pkg-rpm
index f834c00..0b31576 100644
--- a/build-pkg-rpm
+++ b/build-pkg-rpm
@@ -89,17 +89,13 @@ rpm_init_cumulate() {
# ref: https://review.tizen.org/gerrit/#/c/platform/upstream/build/+/25635/
DO_CUMULATE=true
+
local nocumulaterpms=$(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags nocumulaterpms)
if test -n "$nocumulaterpms" ; then
- test "$nocumulaterpms" != 0 && DO_CUMULATE=false
- #else
- # # compatibility: auto-set cumulate for newer suse distros
- # typeset -ri suse_version=$(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" eval '%{?suse_version}')
- # if ((suse_version > 1220)) ; then
- # DO_CUMULATE=true
- # fi
+ test "$nocumulaterpms" != 0 && DO_CUMULATE=false
+ else
+ test "$NOCUMULATE" = true && DO_CUMULATE=false
fi
-
}
pkg_verify_installed_rpm() {
diff --git a/init_buildsystem b/init_buildsystem
index dfab8e3..3e4a892 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -55,6 +55,7 @@ test -x /usr/bin/rpmquery && RPMCHECKOPTS_HOST="--nodigest --nosignature"
# should RPMs be installed with --force ?
USE_FORCE=false
PREPARE_VM=
+NOCUMULATE=false
KEEP_PACKS=
USEUSEDFORBUILD=
LIST_STATE=
@@ -76,6 +77,10 @@ while test -n "$1" ; do
shift
KEEP_PACKS=true
;;
+ --nocumulate)
+ shift
+ NOCUMULATE=true
+ ;;
--create-build-binaries)
shift
CREATE_BUILD_BINARIES=true