From 885cf05a62da19de279ea3af277980c31fda7851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Fri, 13 Aug 2021 17:56:19 +0200 Subject: [PATCH 1/2] xbps-src: source msg_warn before its first use --- xbps-src | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xbps-src b/xbps-src index 086a0fe212fc..5e75926c5ad5 100755 --- a/xbps-src +++ b/xbps-src @@ -689,12 +689,6 @@ fi check_build_requirements -if [ -z "$IN_CHROOT" ]; then - trap 'exit_func' INT TERM - if [ -n "$XBPS_DISTFILES_MIRROR" ]; then - setup_distfiles_mirror - fi -fi # # Read funcs from helpers # @@ -702,6 +696,13 @@ for f in ${XBPS_SHUTILSDIR}/*.sh; do [ -r "$f" ] && . $f done +if [ -z "$IN_CHROOT" ]; then + trap 'exit_func' INT TERM + if [ -n "$XBPS_DISTFILES_MIRROR" ]; then + setup_distfiles_mirror + fi +fi + reconfigure_base_chroot # From 99cac7216396eb0e326a21e2b984752aa13a6dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Fri, 13 Aug 2021 18:58:39 +0200 Subject: [PATCH 2/2] xbps-src: limit warning on file:/// mirror to related targets --- xbps-src | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xbps-src b/xbps-src index 5e75926c5ad5..7fe0ac55ffd8 100755 --- a/xbps-src +++ b/xbps-src @@ -337,7 +337,10 @@ setup_distfiles_mirror() { mkdir -p "$XBPS_MASTERDIR/$path" XBPS_CHROOT_CMD_ARGS+=" -b $path:$path" else - msg_warn "xbps-src: File URLs ($mirror) don't work with '$XBPS_CHROOT_CMD'\n" + case "$XBPS_TARGET" in + fetch|extract|patch|configure|build|check|install|pkg|bootstrap|bootstrap-update|update-sys) + msg_warn "xbps-src: File URLs ($mirror) don't work with '$XBPS_CHROOT_CMD'\n" + esac fi done }