xbps-src: make -K and -C really work.

This commit is contained in:
Juan RP 2011-07-04 21:29:11 +02:00
parent 0ffa09c1b4
commit 24bad5c713
5 changed files with 14 additions and 18 deletions

View file

@ -32,7 +32,6 @@
: ${sudo_cmd:=sudo}
: ${chroot_cmd:=chroot}
: ${xbps_machine:=$(uname -m)}
: ${XBPS_UTILS_REQVER:=20100511}
# Required utilities in host system.
REQHOST_UTILS="gawk bash sed gcc msgfmt patch makeinfo perl fakeroot tar xz"
@ -175,10 +174,10 @@ check_config_vars()
#
while getopts "Cc:hKm:p:Ss:" opt; do
case $opt in
C) KEEP_WRKSRC=1;;
C) export KEEP_WRKSRC=1;;
c) XBPS_CONFIG_FILE="$OPTARG";;
h) usage && exit 0;;
K) KEEP_AUTODEPS=1;;
K) export KEEP_AUTODEPS=1;;
m)
_MASTERDIR_FLAG=1
_MASTERDIR="$OPTARG"
@ -291,7 +290,7 @@ build|configure)
if [ -z "$base_chroot" -a -z "$IN_CHROOT" ]; then
. $XBPS_SHUTILSDIR/chroot.sh
xbps_chroot_handler $target ${_pkgname} $KEEP_WRKSRC $KEEP_AUTODEPS
xbps_chroot_handler $target ${_pkgname}
else
_ORIGINPKG="${_pkgname}"
setup_tmpl ${_ORIGINPKG}
@ -377,8 +376,7 @@ install|install-destdir)
_ORIGINPKG="${_pkgname}"
if [ -z "$IN_CHROOT" -a -z "$base_chroot" ]; then
. $XBPS_SHUTILSDIR/chroot.sh
xbps_chroot_handler $target ${_ORIGINPKG} \
$KEEP_WRKSRC $KEEP_AUTODEPS
xbps_chroot_handler $target ${_ORIGINPKG}
else
setup_tmpl ${_ORIGINPKG}
install_pkg $pkgname
@ -410,8 +408,7 @@ remove)
setup_tmpl ${_pkgname}
if [ -z "$IN_CHROOT" -a -z "$base_chroot" ]; then
. $XBPS_SHUTILSDIR/chroot.sh
xbps_chroot_handler $target ${_pkgname} \
$KEEP_WRKSRC $KEEP_AUTODEPS
xbps_chroot_handler $target ${_pkgname}
else
remove_pkg
fi