aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-12-10 23:32:42 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2006-12-10 23:32:42 +0000
commit8793c8d00999b8dc27f4ca0b0398e6850b27b5c1 (patch)
treef4e0be65a8957d5a5b0b301b0f8baaab6f8257d2 /src
parent476ea29ccad045f2153bd62c2e74dee74f531e23 (diff)
downloadsimplepkg-8793c8d00999b8dc27f4ca0b0398e6850b27b5c1.tar.gz
simplepkg-8793c8d00999b8dc27f4ca0b0398e6850b27b5c1.tar.bz2
simplaret: simplaret_search_and_download_patch fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@72 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-xsrc/simplaret28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/simplaret b/src/simplaret
index 2d39dbe..581660f 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -439,24 +439,24 @@ function simplaret_search_and_download_patch {
local package_version package_build
# get just the file name
- candidate="`echo $candidate | cut -d , -f 1`"
+ sugested="`echo $sugested | cut -d , -f 1`"
# now split the file name into pieces
- package_version="`package_version $candidate`"
- package_build="`package_build $candidate`"
- candidate="`package_name $candidate`"
+ package_version="`package_version $sugested`"
+ package_build="`package_build $sugested`"
+ sugested="`package_name $sugested`"
# check if the patch was already downloaded
- if echo $DOWNLOADED_PATCHES | grep -q " $candidate "; then
+ if echo $DOWNLOADED_PATCHES | grep -q " $sugested "; then
return
fi
# search if its installed in the jail
- installed_packs="`ls /$root/var/log/packages/$candidate* 2> /dev/null`"
+ installed_packs="`ls /$root/var/log/packages/$sugested* 2> /dev/null`"
if [ ! -z "$installed_packs" ]; then
for installed in $installed_packs; do
- if [[ "$candidate" == "`package_name $installed.tgz`" ]]; then
+ if [[ "$sugested" == "`package_name $installed.tgz`" ]]; then
package_installed="1"
break
fi
@@ -464,10 +464,10 @@ function simplaret_search_and_download_patch {
# if the package is installed, download the patch
if [[ "$package_installed" == "1" ]]; then
- # TODO: verificar se eh a mesma versao e build number que esta instalada?
- # DOWNLOAD_EVEN_IF_APPLIED?
- simplaret_get $candidate
- DOWNLOADED_PATCHES="$DOWNLOADED_PATCHES $candidate " # the ending space is important
+ simplaret_get $sugested
+ if [ "$?" == "0" ]; then
+ DOWNLOADED_PATCHES="$DOWNLOADED_PATCHES $sugested " # the ending space is important
+ fi
fi
fi
@@ -507,18 +507,18 @@ function simplaret_get_jail_patches {
echo fetching patches for arch $ARCH and version $VERSION for jail $root
# list all available patches in PATCHES repositories
- for candidate in `simplaret_search -formatted | grep patches`; do
+ for sugested in `simplaret_search -formatted | grep patches`; do
simplaret_search_and_download_patch
done
# list all available patches in ROOT repositories
- for candidate in `simplaret_search patches -formatted | grep root`; do
+ for sugested in `simplaret_search patches -formatted | grep root`; do
simplaret_search_and_download_patch
done
# grab patches from every other places
if [ "$CONSIDER_ALL_PACKAGES_AS_PATCHES" == "1" ]; then
- for candidate in `simplaret_search patches -formatted | grep -v patches | grep -v root`; do
+ for sugested in `simplaret_search patches -formatted | grep -v patches | grep -v root`; do
simplaret_search_and_download_patch
done
fi