xbps-src: remove pkg statedir unless -C is set.
This commit is contained in:
parent
cf072df0f7
commit
5929c2458a
2 changed files with 8 additions and 1 deletions
|
@ -91,6 +91,7 @@ install_pkg() {
|
||||||
remove_pkg_wrksrc
|
remove_pkg_wrksrc
|
||||||
setup_pkg $sourcepkg $cross
|
setup_pkg $sourcepkg $cross
|
||||||
remove_pkg $cross
|
remove_pkg $cross
|
||||||
|
remove_pkg_statedir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If base-chroot not installed, install "base-files" into masterdir
|
# If base-chroot not installed, install "base-files" into masterdir
|
||||||
|
@ -151,6 +152,12 @@ remove_pkg_wrksrc() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove_pkg_statedir() {
|
||||||
|
if [ -d "$XBPS_STATEDIR" ]; then
|
||||||
|
rm -rf "$XBPS_STATEDIR"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
remove_pkg() {
|
remove_pkg() {
|
||||||
local cross="$1" _destdir f
|
local cross="$1" _destdir f
|
||||||
|
|
||||||
|
|
2
xbps-src
2
xbps-src
|
@ -559,8 +559,8 @@ case "$XBPS_TARGET" in
|
||||||
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
||||||
chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG || exit $?
|
chroot_handler $XBPS_TARGET $XBPS_TARGET_PKG || exit $?
|
||||||
else
|
else
|
||||||
[ -d $XBPS_STATEDIR ] && rm -rf $XBPS_STATEDIR
|
|
||||||
remove_pkg_wrksrc $wrksrc
|
remove_pkg_wrksrc $wrksrc
|
||||||
|
remove_pkg_statedir
|
||||||
if declare -f do_clean >/dev/null; then
|
if declare -f do_clean >/dev/null; then
|
||||||
run_func do_clean
|
run_func do_clean
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue