diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-23 18:33:14 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-23 18:33:14 +0000 |
commit | 762c798fbb6208be2ae96869a4439d08a478f065 (patch) | |
tree | b19ac9be74f7098936c2bd16ce6112156e73e2e7 /lib | |
parent | f8b19ca2920fba5020cccaa93f29c35fc6b76e44 (diff) | |
download | simplepkg-762c798fbb6208be2ae96869a4439d08a478f065.tar.gz simplepkg-762c798fbb6208be2ae96869a4439d08a478f065.tar.bz2 |
mkjail: small fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@117 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/common.sh b/lib/common.sh index 4c337e2..4953041 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -93,7 +93,7 @@ function package_build { function install_packages { - local check installed unable_to_install + local check installed unable_to_install root # check if is time to clean the local repository if [ "$SIMPLARET_CLEAN" == "1" ]; then @@ -102,14 +102,16 @@ function install_packages { ARCH=$ARCH VERSION=$VERSION $SIMPLARET --purge -w $SIMPLARET_PURGE_WEEKS fi + root="$JAIL_ROOT/$server" + # now tries to install each package listed in the template for pack in `cat $TEMPLATE | grep -v -e "^#" | cut -d : -f 1`; do # try to install the package - ROOT=/$JAIL_ROOT ARCH=$ARCH VERSION=$VERSION $SIMPLARET --install $pack $extraoptions + ROOT=/$root ARCH=$ARCH VERSION=$VERSION $SIMPLARET --install $pack # check if the package was installed - installed=`eval "ls /$JAIL_ROOT/var/log/packages/ | egrep '^$pack-[^-]+-[^-]+-[^-]+$'"` + installed=`eval "ls /$root/var/log/packages/ | egrep '^$pack-[^-]+-[^-]+-[^-]+$'"` check=$? if [ ! -z "$installed" ] && [ "$check" == "0" ]; then @@ -130,7 +132,7 @@ function install_packages { fi if [ ! -z "$unable_to_install" ]; then - echo "mkjail was unable to install the following packages on $JAIL_ROOT:" + echo "mkjail was unable to install the following packages on $root:" echo -e "$unable_to_install" fi |