From 3a363d261129b5f1fa70f78a4d34a9954d035d80 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 9 Dec 2019 02:38:41 +0100 Subject: [PATCH] xbps-src: account for nonfree repo with -E This makes sure nonfree packages don't get rebuilt when -E is passed to xbps-src. [ci skip] --- common/xbps-src/shutils/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index c2a87be4534..58429861c28 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -306,7 +306,7 @@ get_subpkgs() { setup_pkg() { local pkg="$1" cross="$2" show_problems="$3" - local basepkg val _vars f dbgflags arch + local basepkg val _vars f dbgflags arch extrarepo [ -z "$pkg" ] && return 1 basepkg=${pkg%-32bit} @@ -455,7 +455,11 @@ setup_pkg() { arch="$XBPS_TARGET_MACHINE" fi if [ -n "$XBPS_BINPKG_EXISTS" ]; then - if [ "$($XBPS_QUERY_XCMD -i -R -ppkgver $pkgver 2>/dev/null)" = "$pkgver" ]; then + # nonfree packages need this otherwise they'll rebuild even with -E + if [ -n "$repository" ]; then + extrarepo=" --repository=$XBPS_REPOSITORY/$repository" + fi + if [ "$($XBPS_QUERY_XCMD $extrarepo -i -R -ppkgver $pkgver 2>/dev/null)" = "$pkgver" ]; then exit_and_cleanup fi fi