From 9ffc64e20c28e181d5b9dbb7d8c01b389738355b Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Mon, 20 Nov 2017 14:17:34 +0000 Subject: [PATCH] common: drop 0/no logic from XBPS_{CHECK_PKGS,BUILD_ONLY_ONE_PKG} use the common convention as described in etc/defaults.conf --- common/xbps-src/libexec/xbps-src-docheck.sh | 2 +- common/xbps-src/shutils/build_dependencies.sh | 4 ++-- common/xbps-src/shutils/chroot.sh | 6 +++--- srcpkgs/binutils/template | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/xbps-src/libexec/xbps-src-docheck.sh b/common/xbps-src/libexec/xbps-src-docheck.sh index 0c4f1f3a384..6be6c9d6ead 100755 --- a/common/xbps-src/libexec/xbps-src-docheck.sh +++ b/common/xbps-src/libexec/xbps-src-docheck.sh @@ -27,7 +27,7 @@ if [ -n "$XBPS_CROSS_BUILD" ]; then exit 0 fi -if [ -z "$XBPS_CHECK_PKGS" -o "$XBPS_CHECK_PKGS" = "0" -o "$XBPS_CHECK_PKGS" = "no" ]; then +if [ -z "$XBPS_CHECK_PKGS" ]; then msg_normal "${pkgname}-${version}_${revision}: skipping check (XBPS_CHECK_PKGS is disabled) ...\n" exit 0 fi diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh index f1e7df657a7..464ec27d234 100644 --- a/common/xbps-src/shutils/build_dependencies.sh +++ b/common/xbps-src/shutils/build_dependencies.sh @@ -49,7 +49,7 @@ setup_pkg_depends() { _depver=$(srcpkg_get_version ${_depname}) || exit $? host_build_depends+=" ${_depname}-${_depver}" done - if ! [ -z "$XBPS_CHECK_PKGS" -o "$XBPS_CHECK_PKGS" = "0" -o "$XBPS_CHECK_PKGS" = "no" ]; then + if [ -n "$XBPS_CHECK_PKGS" ]; then for j in ${checkdepends}; do _depname="${j%\?*}" _depver=$(srcpkg_get_version ${_depname}) || exit $? @@ -365,7 +365,7 @@ install_pkg_deps() { missing_rdeps+=("${_realpkg}") done - if [ -n "$XBPS_BUILD_ONLY_ONE_PKG" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "0" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "no" ]; then + if [ -n "$XBPS_BUILD_ONLY_ONE_PKG" ]; then for i in ${host_missing_deps[@]}; do msg_error "dep ${i} not found: -1 passed: instructed not to build\n" done diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index 2379f63ee7f..11c562d22a4 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -44,7 +44,7 @@ _EOF else sed -e 's,@@XARCH@@,,g' -i $XBPS_MASTERDIR/bin/xbps-shell fi - if [ -z "$XBPS_CHECK_PKGS" -o "$XBPS_CHECK_PKGS" = "0" -o "$XBPS_CHECK_PKGS" = "no" ]; then + if [ -z "$XBPS_CHECK_PKGS" ]; then sed -e 's,@@CHECK@@,,g' -i $XBPS_MASTERDIR/bin/xbps-shell else sed -e "s,@@CHECK@@,XBPS_CHECK_PKGS=$XBPS_CHECK_PKGS,g" -i $XBPS_MASTERDIR/bin/xbps-shell @@ -198,8 +198,8 @@ chroot_handler() { [ -n "$XBPS_BUILD_FORCEMODE" ] && arg="$arg -f" [ -n "$XBPS_MAKEJOBS" ] && arg="$arg -j$XBPS_MAKEJOBS" [ -n "$XBPS_DEBUG_PKGS" ] && arg="$arg -g" - [ -z "$XBPS_CHECK_PKGS" -o "$XBPS_CHECK_PKGS" = "0" -o "$XBPS_CHECK_PKGS" = "no" ] || arg="$arg -Q" - [ -n "$XBPS_BUILD_ONLY_ONE_PKG" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "0" -a "$XBPS_BUILD_ONLY_ONE_PKG" != "no" ] && arg="$arg -1" + [ -n "$XBPS_CHECK_PKGS" ] && arg="$arg -Q" + [ -n "$XBPS_BUILD_ONLY_ONE_PKG" ] && arg="$arg -1" [ -n "$XBPS_QUIET" ] && arg="$arg -q" [ -n "$XBPS_SKIP_DEPS" ] && arg="$arg -I" [ -n "$XBPS_ALT_REPOSITORY" ] && arg="$arg -r $XBPS_ALT_REPOSITORY" diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template index 3d268b6b93a..e64627219d3 100644 --- a/srcpkgs/binutils/template +++ b/srcpkgs/binutils/template @@ -14,7 +14,7 @@ if [ "$CHROOT_READY" ]; then hostmakedepends="flex perl" checkdepends="bc" else - export XBPS_CHECK_PKGS=0 + unset XBPS_CHECK_PKGS fi makedepends+=" zlib-devel"