Fix installing base_chroot pkgs.

--HG--
extra : convert_revision : 80b4baf95c1eaa9465662cca381f823841fe8eb6
This commit is contained in:
Juan RP 2008-10-27 10:29:21 +01:00
parent 7518727c64
commit 69aa44ff17
2 changed files with 11 additions and 13 deletions

View File

@ -6,6 +6,8 @@
# Umount stuff if SIGINT or SIGQUIT was caught # Umount stuff if SIGINT or SIGQUIT was caught
trap umount_chroot_fs INT QUIT trap umount_chroot_fs INT QUIT
[ -n "$base_chroot" ] && return 0
check_installed_pkg xbps-base-chroot 0.1 check_installed_pkg xbps-base-chroot 0.1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "*** ERROR: xbps-base-chroot pkg not installed ***" echo "*** ERROR: xbps-base-chroot pkg not installed ***"

22
xbps.sh
View File

@ -1212,7 +1212,7 @@ install_pkg()
# If we are being invoked via install-chroot, reread config file # If we are being invoked via install-chroot, reread config file
# to get correct stuff. # to get correct stuff.
# #
if [ "$XBPS_MASTERDIR" = "/" ]; then if [ -n "$in_chroot" ]; then
check_config_vars check_config_vars
set_defvars set_defvars
fi fi
@ -1221,6 +1221,12 @@ install_pkg()
run_file $cur_tmpl run_file $cur_tmpl
pkg="$curpkgn-$version" pkg="$curpkgn-$version"
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then
. $XBPS_TMPLHELPDIR/chroot.sh
install_chroot_pkg $curpkgn
return $?
fi
# #
# If we are the originator package save the path this template in # If we are the originator package save the path this template in
# other var for future use. # other var for future use.
@ -1547,20 +1553,10 @@ info)
;; ;;
install-destdir) install-destdir)
install_destdir_target=yes install_destdir_target=yes
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then install_pkg $2
run_file $XBPS_TMPLHELPDIR/chroot.sh
install_chroot_pkg $2
else
install_pkg $2
fi
;; ;;
install) install)
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then install_pkg $2
run_file $XBPS_TMPLHELPDIR/chroot.sh
install_chroot_pkg $2
else
install_pkg $2
fi
;; ;;
list) list)
list_pkgs list_pkgs