xbps-src: perform chroot setup via binary-boostrap or bootstrap-update.
This will improve performance somewhat on buildbot because the bootstrap pkgs will only be configured once, and not each time due to `xbps-src -t`. Also remove redundant checks.
This commit is contained in:
parent
6d98eb908d
commit
f35aa4cc19
1 changed files with 12 additions and 14 deletions
26
xbps-src
26
xbps-src
|
@ -314,6 +314,8 @@ install_bbootstrap() {
|
|||
|
||||
msg_normal "Installed bootstrap successfully!\n"
|
||||
chroot_prepare $XBPS_TARGET_PKG || msg_error "Failed to initialize chroot!\n"
|
||||
chroot_check
|
||||
chroot_handler clean
|
||||
}
|
||||
|
||||
reconfigure_bootstrap_pkgs() {
|
||||
|
@ -555,9 +557,13 @@ if [ -n "${NO_COLOR+x}" ]; then
|
|||
export NOCOLORS=1
|
||||
fi
|
||||
|
||||
if [ -f $XBPS_MASTERDIR/.xbps_chroot_init ]; then
|
||||
export CHROOT_READY=1
|
||||
fi
|
||||
chroot_check() {
|
||||
if [ -f $XBPS_MASTERDIR/.xbps_chroot_init ]; then
|
||||
export CHROOT_READY=1
|
||||
fi
|
||||
}
|
||||
|
||||
chroot_check
|
||||
|
||||
if [ -z "$XBPS_REINIT" -a -s $XBPS_MASTERDIR/.xbps_chroot_init ]; then
|
||||
export XBPS_ARCH=${XBPS_ARCH:-$(cat $XBPS_MASTERDIR/.xbps_chroot_init)}
|
||||
|
@ -673,18 +679,14 @@ case "$XBPS_TARGET" in
|
|||
install_bbootstrap bootstrap
|
||||
;;
|
||||
bootstrap-update)
|
||||
bootstrap_update
|
||||
chroot_handler bootstrap-update
|
||||
;;
|
||||
chroot)
|
||||
chroot_handler chroot dummy
|
||||
;;
|
||||
clean)
|
||||
if [ -z "$XBPS_TARGET_PKG" ]; then
|
||||
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
||||
chroot_handler remove-autodeps
|
||||
else
|
||||
remove_pkg_autodeps
|
||||
fi
|
||||
chroot_handler remove-autodeps
|
||||
msg_normal "xbps-src: cleaning up masterdir...\n"
|
||||
chmod -R +wX $XBPS_MASTERDIR/builddir # Needed to remove Go Modules
|
||||
rm -rf $XBPS_MASTERDIR/builddir $XBPS_MASTERDIR/destdir
|
||||
|
@ -707,11 +709,7 @@ case "$XBPS_TARGET" in
|
|||
consistency_check
|
||||
;;
|
||||
remove-autodeps)
|
||||
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
|
||||
chroot_handler remove-autodeps
|
||||
else
|
||||
remove_pkg_autodeps
|
||||
fi
|
||||
chroot_handler remove-autodeps
|
||||
;;
|
||||
fetch|extract|build|check|configure|install|pkg)
|
||||
if [ "$XBPS_TARGET" = "check" ]; then
|
||||
|
|
Loading…
Reference in a new issue