From 9e794539646d3e7b392c197faf14ae80acd3160f Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 6 Feb 2007 16:58:48 +0000 Subject: new config variable STORE_ROOT_PATCHES_ON_PATCHES_DIR git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@151 04377dda-e619-0410-9926-eae83683ac58 --- src/simplaret | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/simplaret b/src/simplaret index d9fd1c8..cb676f9 100755 --- a/src/simplaret +++ b/src/simplaret @@ -439,10 +439,13 @@ function simplaret_search_and_delete { if [ "`package_name $candidate`" == "`package_name $result`" ]; then if [ "`package_version $candidate`" == "`package_version $result`" ] && \ [ "`package_build $candidate`" == "`package_build $result`" ]; then + LAST_DONWLOADED_PACKAGE="$file" if [ "$3" != "--silent" ]; then echo Package $candidate already downloaded # echo Package $candidate stored at `dirname $file` - else echo $file + else + true + # echo $file fi return 1 else @@ -495,7 +498,8 @@ function simplaret_get { # if repos_type == root and the package is a patch, # save it on $PATCHES_DIR/root-$repository_name, so all patches # are placed in the same tree - if [ "$repos_type" == "root" ] && echo $file | grep -q "patches"; then + if [ "$repos_type" == "root" ] && \ + [ "$STORE_ROOT_PATCHES_ON_PATCHES_DIR" == "1" ] && echo $file | grep -q "patches"; then folder="$PATCHES_DIR/$ARCH/$VERSION/root-$repository_name" else folder="$storage/$repository_name" @@ -528,7 +532,7 @@ function simplaret_get { } -function simplaret_search_and_download_patch { +function simplaret_search_and_process_patch { local package_version package_build installed_version local installed_build repos_type get is_patch package_match @@ -663,18 +667,18 @@ function simplaret_get_jail_patches { # list all available patches from PATCHES and ROOT repositories for sugested in `simplaret_search --formatted | grep patches | grep -v ",repos," | grep -v ",noarch,"`; do - simplaret_search_and_download_patch + simplaret_search_and_process_patch done # grab patches from every other places if [ "$CONSIDER_ALL_PACKAGES_AS_PATCHES" == "1" ]; then for sugested in `simplaret_search --formatted | grep patches | grep ",repos," | grep ",noarch,"`; do - simplaret_search_and_download_patch + simplaret_search_and_process_patch done for sugested in `simplaret_search --formatted | grep -v patches`; do - simplaret_search_and_download_patch + simplaret_search_and_process_patch done fi -- cgit v1.2.3