From 1ccc884f1c412f5b0e98fa16c6d21bc11704356d Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Wed, 15 Dec 2021 22:38:17 +0100 Subject: [PATCH] xbps-src: make -E ignore remote repositories with -N --- common/xbps-src/shutils/common.sh | 10 +++++++++- xbps-src | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 47ff365e9f..36038af980 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -472,7 +472,15 @@ setup_pkg() { fi makejobs="-j$XBPS_MAKEJOBS" if [ -n "$XBPS_BINPKG_EXISTS" ]; then - local _binpkgver="$($XBPS_QUERY_XCMD -R -ppkgver $pkgver 2>/dev/null)" + local extraflags="" + if [ -n "$XBPS_SKIP_REMOTEREPOS" ]; then + extraflags="-i" + # filter out remote repositories + for repo in $(xbps-query -L | awk '{ print $2 }' | grep '^/host/'); do + extraflags+=" --repository=$repo" + done + fi + local _binpkgver="$($XBPS_QUERY_XCMD -R -ppkgver $pkgver $extraflags 2>/dev/null)" if [ "$_binpkgver" = "$pkgver" ]; then if [ -z "$XBPS_DEPENDENCY" ]; then local _repo="$($XBPS_QUERY_XCMD -R -prepository $pkgver 2>/dev/null)" diff --git a/xbps-src b/xbps-src index 8488c5a3a4..47023a7235 100755 --- a/xbps-src +++ b/xbps-src @@ -157,7 +157,7 @@ $(print_cross_targets) -C Do not remove build directory, automatic dependencies and package destdir after successful install. --E If a binary package exists in a local repository for the target package, +-E If a binary package exists in a repository for the target package, do not try to build it, exit immediately. -f Force running the specified stage (configure/build/install/pkg)