diff options
author | biao716.wang <biao716.wang@samsung.com> | 2022-12-14 18:30:24 +0900 |
---|---|---|
committer | biao716.wang <biao716.wang@samsung.com> | 2022-12-14 21:38:59 +0900 |
commit | 0bb60b3435ea1fa8c2676c428a0834c6c95245c7 (patch) | |
tree | 1963f9c7dbe424cb838a910eb16bf74899a06837 | |
parent | 470fb6a944f672bb2fe457825955d8d702c80666 (diff) | |
download | build-0bb60b3435ea1fa8c2676c428a0834c6c95245c7.tar.gz build-0bb60b3435ea1fa8c2676c428a0834c6c95245c7.tar.bz2 build-0bb60b3435ea1fa8c2676c428a0834c6c95245c7.zip |
Support BuildFlags: nocumulaterpms
- default condition : "DO_CUMULATE=true"
- If we specify "BuildFlags: nocumulaterpms" in project config --> set "DO_CUMULATE=false"
https://github.com/openSUSE/obs-build/commit/aee26521f91ee3d195d89f2c1f33072f5bf658b0
Change-Id: I360c8279797c43cb0adf1b9f0c6be2882fb47219
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
-rw-r--r-- | build-pkg-rpm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/build-pkg-rpm b/build-pkg-rpm index 9f4b15d..f834c00 100644 --- a/build-pkg-rpm +++ b/build-pkg-rpm @@ -88,13 +88,18 @@ rpm_init_cumulate() { # # ref: https://review.tizen.org/gerrit/#/c/platform/upstream/build/+/25635/ - -# DO_CUMULATE= -# typeset -ri suse_version=$(chroot "$BUILD_ROOT" rpm --eval '%{?suse_version}' 2>/dev/null) -# if ((suse_version > 1220)) ; then -# DO_CUMULATE=true -# fi 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 + fi + } pkg_verify_installed_rpm() { @@ -137,7 +142,7 @@ pkg_finalize_rpm() { rm -f "$BUILD_ROOT"/${CUMULATED_LIST[$num]} cp "$BUILD_ROOT"/.init_b_cache/rpms/$PKG "$BUILD_ROOT"/${CUMULATED_LIST[$num]} || cleanup_and_exit 1 done > "$BUILD_ROOT"/.init_b_cache/manifest - ( cd "$BUILD_ROOT" && chroot "$BUILD_ROOT" rpm --ignorearch --noorder --nodeps -Uh --oldpackage --ignoresize --verbose $RPMCHECKOPTS \ + ( cd "$BUILD_ROOT" && chroot "$BUILD_ROOT" rpm --ignorearch --nodeps -Uh --oldpackage --ignoresize --verbose $RPMCHECKOPTS \ $ADDITIONAL_PARAMS .init_b_cache/manifest 2>&1 || touch "$BUILD_ROOT"/exit ) for ((num=0; num<=cumulate; num++)) ; do rm -f "$BUILD_ROOT"/${CUMULATED_LIST[$num]} |