diff --git a/helper-templates/install-chroot.sh b/helper-templates/chroot.sh similarity index 95% rename from helper-templates/install-chroot.sh rename to helper-templates/chroot.sh index b6777e18132..f8aaef06f2f 100644 --- a/helper-templates/install-chroot.sh +++ b/helper-templates/chroot.sh @@ -80,6 +80,13 @@ install_chroot_pkg() echo "==> Exiting from the chroot on $XBPS_MASTERDIR..." } +enter_chroot() +{ + chroot $XBPS_MASTERDIR /bin/bash + umount_chroot_fs + echo "==> Exiting from the chroot on $XBPS_MASTERDIR..." +} + umount_chroot_fs() { local fs= diff --git a/xbps.sh b/xbps.sh index f9c314870eb..48d97d625b0 100755 --- a/xbps.sh +++ b/xbps.sh @@ -50,6 +50,7 @@ $progname: [-C] [-c ] [package_name] Targets: build Builds a package, only build phase is done. + chroot Enters to the chroot in masterdir. configure Configure a package, only configure phase is done. extract Extract distribution file(s) into build directory. fetch Download distribution file(s). @@ -66,7 +67,7 @@ Targets: Options: -C Do not remove build directory after successful installation. -c Path to global configuration file: - if not specified /usr/local/etc/xbps.conf is used. + if not specified /etc/xbps.conf is used. _EOF exit 1 } @@ -1443,6 +1444,10 @@ build) fi build_src_phase $2 ;; +chroot) + run_file $XBPS_TMPLHELPDIR/chroot.sh + enter_chroot + ;; configure) setup_tmpl $2 fetch_distfiles $2 @@ -1466,7 +1471,7 @@ info) ;; install-chroot) setup_tmpl $2 - run_file $XBPS_TMPLHELPDIR/install-chroot.sh + run_file $XBPS_TMPLHELPDIR/chroot.sh install_chroot_pkg $2 ;; install-destdir)