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:
Juan RP 2011-07-06 08:16:56 +02:00
parent 8156eeb03e
commit 5355f32aca
33 changed files with 60 additions and 39 deletions

View file

@ -50,7 +50,7 @@ install_pkg()
check_installed_pkg "$pkg"
if [ $? -eq 1 -o $? -eq 0 ]; then
instver="$($XBPS_PKGDB_CMD version $pkgname)"
if [ -n "$instver" ]; then
if [ -n "$instver" -a -z "$DESTDIR_ONLY_INSTALL" ]; then
echo "=> $pkgname-$instver already installed."
return 0
fi
@ -130,6 +130,7 @@ install_pkg()
if [ -d "$wrksrc" -a -z "$KEEP_WRKSRC" ]; then
remove_tmpl_wrksrc $wrksrc
fi
return 0
fi
# Stow package into masterdir.
@ -200,7 +201,6 @@ remove_pkg()
[ -z $pkgname ] && msg_error "unexistent package, aborting.\n"
ver=$($XBPS_PKGDB_CMD version $pkgname)
stow_pkg_handler unstow || return $?
for subpkg in ${subpackages}; do
if [ -d "$XBPS_DESTDIR/${subpkg}-${ver%_*}" ]; then
@ -223,6 +223,8 @@ remove_pkg()
[ -f $XBPS_POST_INSTALL_DONE ] && rm -f $XBPS_POST_INSTALL_DONE
[ -f $XBPS_INSTALL_DONE ] && rm -f $XBPS_INSTALL_DONE
stow_pkg_handler unstow || return $?
[ -n "$found" ] && return 0
return 1