xbps-src: add option to not sync repositories

This commit is contained in:
Duncaen
2026-02-22 17:07:32 +01:00
parent 38b17b4d89
commit 1db9485d28
2 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -316,7 +316,7 @@ chroot_sync_repodata() {
fi
# Make sure to sync index for remote repositories.
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
if [ -z "$XBPS_SKIP_REMOTEREPOS" -a -z "$XBPS_SKIP_SYNC" ]; then
msg_normal "xbps-src: updating repositories for host ($XBPS_MACHINE)...\n"
$XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -S
fi
@@ -327,7 +327,7 @@ chroot_sync_repodata() {
cp $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
# Make sure to sync index for remote repositories.
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
if [ -z "$XBPS_SKIP_REMOTEREPOS" -a -z "$XBPS_SKIP_SYNC" ]; then
msg_normal "xbps-src: updating repositories for target ($XBPS_TARGET_MACHINE)...\n"
env -- XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE \
$XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S
+5 -1
View File
@@ -218,6 +218,8 @@ $(print_cross_targets)
-N Disable use of remote repositories to resolve dependencies.
-n Disable syncing of remote repositories.
-o <opt,~opt2,...>
Enable or disable (prefixed with ~) package build options. If 'etc/conf'
already specifies some, it is merged. Keep in mind that these options
@@ -384,7 +386,7 @@ XBPS_VERSION=${XBPS_VERSION##*:}
readonly XBPS_SRC_VERSION="113"
XBPS_OPTIONS=
XBPS_OPTSTRING="1A:a:bc:CEfgGhH:iIj:Lm:No:p:qsQKr:tvV"
XBPS_OPTSTRING="1A:a:bc:CEfgGhH:iIj:Lm:Nno:p:qsQKr:tvV"
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
@@ -412,6 +414,7 @@ while getopts "$XBPS_OPTSTRING" opt; do
L) export NOCOLORS=1; XBPS_OPTIONS+=" -L";;
m) XBPS_ARG_MASTERDIR="$OPTARG"; XBPS_OPTIONS+=" -m $OPTARG";;
N) XBPS_ARG_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+=" -N";;
n) XBPS_ARG_SKIP_SYNC=1; XBPS_OPTIONS+=" -n";;
o) XBPS_ARG_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+=" -o $OPTARG";;
p) XBPS_ARG_PRINT_VARIABLES="$OPTARG"; XBPS_OPTIONS+=" -p $OPTARG";;
q) XBPS_ARG_QUIET=1; XBPS_OPTIONS+=" -q";;
@@ -495,6 +498,7 @@ fi
[ -n "$XBPS_ARG_BUILD_ONLY_ONE_PKG" ] && XBPS_BUILD_ONLY_ONE_PKG=yes
[ -n "$XBPS_ARG_IGNORE_BROKENNESS" ] && XBPS_IGNORE_BROKENNESS=1
[ -n "$XBPS_ARG_SKIP_REMOTEREPOS" ] && XBPS_SKIP_REMOTEREPOS=1
[ -n "$XBPS_ARG_SKIP_SYNC" ] && XBPS_SKIP_SYNC=1
[ -n "$XBPS_ARG_BUILD_FORCEMODE" ] && XBPS_BUILD_FORCEMODE=1
[ -n "$XBPS_ARG_INFORMATIVE_RUN" ] && XBPS_INFORMATIVE_RUN=1
[ -n "$XBPS_ARG_TEMP_MASTERDIR" ] && XBPS_TEMP_MASTERDIR=1