From 33a5320079f1ea06f444f80810d9756a51c71a7a Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 27 Jan 2024 15:51:37 -0800 Subject: [PATCH] xbps-src: fix masterdir creation if "masterdir" exists need to check if masterdir is for the requested arch or not --- xbps-src | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbps-src b/xbps-src index fcc7bb988e1..3638d4f292a 100755 --- a/xbps-src +++ b/xbps-src @@ -535,7 +535,8 @@ if [ "$XBPS_CHROOT_CMD" = ethereal ]; then else : "${XBPS_MASTERDIR:=$XBPS_DISTDIR/masterdir-$XBPS_MACHINE}" # but use $XBPS_DISTDIR/masterdir if it exists and the new style doesn't - if [ ! -d "${XBPS_MASTERDIR}" ] && [ -d "${XBPS_DISTDIR}/masterdir" ]; then + if [ ! -d "${XBPS_MASTERDIR}" ] && [ -d "${XBPS_DISTDIR}/masterdir" ] \ + && [ "$(cat "${XBPS_DISTDIR}"/masterdir/.xbps_chroot_init)" = "$XBPS_MACHINE" ]; then XBPS_MASTERDIR="${XBPS_DISTDIR}/masterdir" fi fi