xbps-src: fix clean-repocache
xbps-remove needs the right rootdir to not remove packages still required by repos. Without it it will just delete everything since it can't be found in any of the registered repositories.
This commit is contained in:
@@ -866,8 +866,16 @@ case "$XBPS_TARGET" in
|
||||
fi
|
||||
;;
|
||||
clean-repocache)
|
||||
export XBPS_TARGET_ARCH="${XBPS_CROSS_BUILD:-$XBPS_TARGET_MACHINE}"
|
||||
$XBPS_REMOVE_CMD -C /dev/null -c $XBPS_HOSTDIR/repocache-${XBPS_TARGET_ARCH} -O
|
||||
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
||||
chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG || exit $?
|
||||
else
|
||||
if [ "$XBPS_CROSS_BUILD" ]; then
|
||||
setup_env "$XBPS_CROSS_BUILD"
|
||||
$XBPS_REMOVE_XCMD -c "$XBPS_HOSTDIR/repocache-${XBPS_TARGET_MACHINE}" -O
|
||||
else
|
||||
$XBPS_REMOVE_CMD -c "$XBPS_HOSTDIR/repocache-${XBPS_TARGET_MACHINE}" -O
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
consistency-check)
|
||||
consistency_check
|
||||
|
||||
Reference in New Issue
Block a user