aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-11-06 21:07:01 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-11-06 21:07:01 +0000
commit87552a5d93c064e38b74ac0468d014b4bc33f39c (patch)
treea05fb87c46d4f79536b4f1035b93a37620c5b45e
parent066118c1aa22b0afa8fac1b02895e753db2c7c39 (diff)
downloadsimplepkg-87552a5d93c064e38b74ac0468d014b4bc33f39c.tar.gz
simplepkg-87552a5d93c064e38b74ac0468d014b4bc33f39c.tar.bz2
jail-upgrade: fixed bugs and made it recursive
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@24 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--doc/CHANGELOG4
-rwxr-xr-xsrc/jail-upgrade32
-rwxr-xr-xsrc/simplaret2
3 files changed, 29 insertions, 9 deletions
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index 5a795cc..d473559 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -1,6 +1,10 @@
simplepkg changelog
-------------------
+0.4.9pre7: jail-upgrade:
+ - fix in swaret upgrade method
+ - act recursively on patches' folder
+
0.4.9pre6: createpkg:
- fixes
- now with slackbuild error handling
diff --git a/src/jail-upgrade b/src/jail-upgrade
index b9567fd..c33180c 100755
--- a/src/jail-upgrade
+++ b/src/jail-upgrade
@@ -20,14 +20,20 @@ COMMON="/usr/libexec/simplepkg/common.sh"
function swaret_jail_upgrade {
+ echo upgrading jail $1...
+
if [ ! -d "$PATCHES_DIR" ]; then
- cd $PATCHES_DIR
- for installed in `ls $1/var/log/packages/$pack* 2> /dev/null`; do
- if [[ $pack == `package_name $installed.tgz` ]]; then
- if [[ "`basename $installed`" != "`basename $file .tgz`" ]]; then
- ROOT=$1 upgradepkg $file
+ # cd $PATCHES_DIR
+ # for file in `ls *tgz`; do
+ for file in `find $PATCHES_DIR -name *tgz`; do
+ pack=`package_name $file`
+ for installed in `ls $1/var/log/packages/$pack* 2> /dev/null`; do
+ if [[ $pack == `package_name $installed.tgz` ]]; then
+ if [[ "`basename $installed`" != "`basename $file .tgz`" ]]; then
+ ROOT=$1 upgradepkg $file
+ fi
fi
- fi
+ done
done
fi
}
@@ -44,8 +50,9 @@ function simplaret_jail_upgrade {
fi
if [ -d "$PATCHES_DIR/$ARCH/$VERSION" ]; then
- cd $PATCHES_DIR/$ARCH/$VERSION
- for file in `ls *tgz`; do
+ # cd $PATCHES_DIR/$ARCH/$VERSION
+ # for file in `ls *tgz`; do
+ for file in `find $PATCHES_DIR/$ARCH/$VERSION -name *tgz`; do
pack=`package_name $file`
for installed in `ls $1/var/log/packages/$pack* 2> /dev/null`; do
if [[ "$pack" == "`package_name $installed.tgz`" ]]; then
@@ -101,7 +108,16 @@ elif [ -d "$JAIL_ROOT/$1" ]; then
else
echo error: jail $JAIL_ROOT/$1 dont looks like a slackware system
fi
+# elif [ -f "$1" ]; then
+# basename="`basename $1 tgz`"
+# if [ "`basename $1 | sed -e "s/^$basename//"`" == "tgz" ]; then
+# # TODO:
+# # - descobrir a arquitetura do pacote
+# # - atualizar nas jaulas de mesma arquitetura
+# true
+# fi
else
echo "error: jail $0 does not exist"
exit 1
fi
+
diff --git a/src/simplaret b/src/simplaret
index b2b7d2b..cdcf430 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -371,7 +371,7 @@ function simplaret_get_patches {
echo fetching patches for arch $ARCH and version $VERSION...
- # check for the downloaded patches
+ # check for downloaded patches
for patch in `ls $PATCHES_DIR/$ARCH/$VERSION/*tgz 2> /dev/null`; do
file="`find $STORAGE/$ARCH/$VERSION/ -name $patch 2> /dev/null`"
if [ ! -f "$file" ]; then