diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-23 14:00:05 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-23 14:00:05 +0000 |
commit | 52b532304a7a11ed7d0cb8b3a189ee7e0524bddb (patch) | |
tree | e14b89d1952adc933cbe71be4f4fd3d4c67d8014 /src/simplaret | |
parent | 640fab565d59163048976a215188aa90ce0f5fcb (diff) | |
download | simplepkg-52b532304a7a11ed7d0cb8b3a189ee7e0524bddb.tar.gz simplepkg-52b532304a7a11ed7d0cb8b3a189ee7e0524bddb.tar.bz2 |
simplaret: remove jail-upgrade
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@114 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src/simplaret')
-rwxr-xr-x | src/simplaret | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/simplaret b/src/simplaret index b77322e..adef9b8 100755 --- a/src/simplaret +++ b/src/simplaret @@ -554,7 +554,11 @@ function simplaret_search_and_download_patch { # finally, get the package if [ "$get" == "yes" ]; then - simplaret_get $sugested + if [ "$S_UPGRADE" == "1" ]; then + simplaret_install $sugested + else + simplaret_get $sugested + fi if [ "$?" == "0" ]; then DOWNLOADED_PATCHES="$DOWNLOADED_PATCHES $ARCH:$VERSION:$sugested " # the ending space is important fi @@ -600,7 +604,6 @@ function simplaret_get_jail_patches { echo fetching patches for arch $ARCH and version $VERSION for jail $root # list all available patches from PATCHES and ROOT repositories - # old behaviour: for sugested in `simplaret_search --formatted | grep patches`; do for sugested in `simplaret_search --formatted | grep patches | grep -v ",repos," | grep -v ",noarch,"`; do simplaret_search_and_download_patch done @@ -608,9 +611,6 @@ function simplaret_get_jail_patches { # grab patches from every other places if [ "$CONSIDER_ALL_PACKAGES_AS_PATCHES" == "1" ]; then - # old behaviour was just one loop: - # for sugested in `simplaret_search --formatted | grep -v patches`; do - for sugested in `simplaret_search --formatted | grep patches | grep ",repos," | grep ",noarch,"`; do simplaret_search_and_download_patch done @@ -631,6 +631,10 @@ function simplaret_get_patches { local jailpath + if [ "$1" == "--upgrade" ]; then + IS_UPGRADE="1" + fi + # first get patches from the root system simplaret_get_jail_patches @@ -691,10 +695,11 @@ function simplaret_install { ROOT=$root upgradepkg --install-new $package else echo "error: could not install package $package: file not found" + return 1 fi else echo "error: could not install package $package" - exit 1 + return 1 fi } @@ -743,7 +748,7 @@ case $1 in "--get-patches" | "get-patches") simplaret_get_patches ;; "--purge" | "purge") shift ; simplaret_purge $* ;; "--install" | "install") simplaret_install $2 ;; - "--upgrade" | "upgrade") simplaret_get_patches ; jail-upgrade ;; + "--upgrade" | "upgrade") simplaret_get_patches --upgrade ;; "--remove" | "remove") removepkg $2 ;; *) simplaret_usage ;; esac |