xbps-src: support building bootstrap pkgs in chroot with -D.
The base_chroot var has been renamed to bootstrap, to avoid conflicts with the base-chroot pkg. So now you can rebuild any bootstrap package if the masterdir is ready (base-chroot already) installed and installation is only to destdir.
This commit is contained in:
@@ -315,6 +315,16 @@ else
|
||||
fi
|
||||
export PATH="$MYPATH"
|
||||
|
||||
#
|
||||
# If masterdir is ready (base-chroot installed and chroot set up) and
|
||||
# XBPS_PREFER_BINPKG_DEPS enabled, force ignoring rules to handle
|
||||
# bootstrap packages.
|
||||
#
|
||||
if [ -n "$DESTDIR_ONLY_INSTALL" -a -n "$XBPS_PREFER_BINPKG_DEPS" \
|
||||
-a -f "$XBPS_MASTERDIR/.xbps_perms_done" ]; then
|
||||
export IGNORE_BOOTSTRAP_PKGS=1
|
||||
fi
|
||||
|
||||
#
|
||||
# Main switch.
|
||||
#
|
||||
@@ -332,7 +342,7 @@ build|configure)
|
||||
_pkgname=$(basename_cwd)
|
||||
fi
|
||||
|
||||
if [ -z "$base_chroot" -a -z "$IN_CHROOT" ]; then
|
||||
if [ -z "$bootstrap" -a -z "$IN_CHROOT" ]; then
|
||||
. $XBPS_SHUTILSDIR/chroot.sh
|
||||
xbps_chroot_handler $target ${_pkgname}
|
||||
else
|
||||
@@ -416,7 +426,7 @@ install)
|
||||
fi
|
||||
setup_tmpl ${_pkgname}
|
||||
_ORIGINPKG="${_pkgname}"
|
||||
if [ -z "$IN_CHROOT" -a -z "$base_chroot" ]; then
|
||||
if [ -z "$IN_CHROOT" -a -z "$bootstrap" ]; then
|
||||
. $XBPS_SHUTILSDIR/chroot.sh
|
||||
xbps_chroot_handler $target ${_ORIGINPKG}
|
||||
else
|
||||
@@ -448,7 +458,7 @@ remove)
|
||||
_pkgname=$(basename_cwd)
|
||||
fi
|
||||
setup_tmpl ${_pkgname}
|
||||
if [ -z "$IN_CHROOT" -a -z "$base_chroot" ]; then
|
||||
if [ -z "$IN_CHROOT" -a -z "$bootstrap" ]; then
|
||||
. $XBPS_SHUTILSDIR/chroot.sh
|
||||
xbps_chroot_handler $target ${_pkgname}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user