diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-12 18:29:59 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-01-12 18:29:59 +0000 |
commit | 5f057cf540b6946a53ee76b9bf8e0c2cf82bdc41 (patch) | |
tree | 0fe3ed6af0dbe232fa359933d70c4f7cdb4619fa /src/simplaret | |
parent | 90815cbad3c49fb2e39108e43019fd6901e8f71b (diff) | |
download | simplepkg-5f057cf540b6946a53ee76b9bf8e0c2cf82bdc41.tar.gz simplepkg-5f057cf540b6946a53ee76b9bf8e0c2cf82bdc41.tar.bz2 |
simplepkg.conf: updated
simplaret:
- added DOWNLOAD_EVEN_APPLIED_PATCHES
- logic fix in simplaret_search_and_download_patch
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@99 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src/simplaret')
-rwxr-xr-x | src/simplaret | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/simplaret b/src/simplaret index f080748..83d2ea9 100755 --- a/src/simplaret +++ b/src/simplaret @@ -55,6 +55,7 @@ function simplaret_eval_config { ROOT_PRIORITY="`simplaret_eval_parameter ROOT_PRIORITY patches slackware extra testing pasture`" SIMPLARET_PURGE_WEEKS="`simplaret_eval_parameter SIMPLARET_PURGE_WEEKS 0`" CONSIDER_ALL_PACKAGES_AS_PATCHES="`simplaret_eval_parameter CONSIDER_ALL_PACKAGES_AS_PATCHES 0`" + DOWNLOAD_EVEN_APPLIED_PATCHES="`simplaret_eval_parameter DOWNLOAD_EVEN_APPLIED_PATCHES 0`" # now we place "patches" on the top of ROOT_PRIORITY ROOT_PRIORITY="patches `echo $ROOT_PRIORITY | sed -e 's/patches//'`" @@ -469,7 +470,7 @@ function simplaret_get { function simplaret_search_and_download_patch { local package_version package_build installed_version - local installed_build repos_type get + local installed_build repos_type get is_patch # get the repository type repos_type="`echo $sugested | cut -d , -f 2`" @@ -477,6 +478,12 @@ function simplaret_search_and_download_patch { # get just the file name sugested="`echo $sugested | cut -d , -f 1`" + if echo $sugested | grep -q "patches"; then + is_patch="yes" + else + is_patch="no" + fi + # now split the file name into pieces package_version="`package_version $sugested`" package_build="`package_build $sugested`" @@ -500,11 +507,26 @@ function simplaret_search_and_download_patch { fi done + get="no" + # if the package is installed, download the patch if [ "$package_installed" == "1" ]; then - if [ "$repos_type" == "patches" ] || [ "$repos_type" == "root" ]; then - # TODO: DOWNLOAD_EVEN_APPLIED_PATCHES - get="yes" + if [ "$repos_type" == "patches" ]; then + + if [ "$DOWNLOAD_EVEN_APPLIED_PATCHES" == "1" ]; then + get="yes" + elif [ "$package_version" != "$installed_version" ] || [ "$package_build" != "$installed_build" ]; then + get="yes" + fi + + elif [ "$repos_type" == "root" ] && [ "$is_patch" == "yes" ]; then + + if [ "$DOWNLOAD_EVEN_APPLIED_PATCHES" == "1" ]; then + get="yes" + elif [ "$package_version" != "$installed_version" ] || [ "$package_build" != "$installed_build" ]; then + get="yes" + fi + else # here, we're dealing with repositories other than ROOT and REPOS, # so we need to check if either version or build number are different, |