]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
new config variable STORE_ROOT_PATCHES_ON_PATCHES_DIR
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Tue, 6 Feb 2007 16:58:48 +0000 (16:58 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Tue, 6 Feb 2007 16:58:48 +0000 (16:58 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@151 04377dda-e619-0410-9926-eae83683ac58

conf/simplepkg.conf.new
doc/CHANGELOG
lib/common.sh
simplepkg.SlackBuild
src/simplaret

index bf6245079e49cebf2cecd3d9a23e0293fd1f7ab5..51187ef46a8e648b66258b2093c047b3a17cfe46 100644 (file)
@@ -65,14 +65,24 @@ ROOT_PRIORITY="patches slackware extra testing pasture"
 # to keep local copies of all needed patches for your system
 DOWNLOAD_EVEN_APPLIED_PATCHES="0"
 
-# Enabling this option, jail-upgrade will look at your
-# standard repositories for new packages; if it find a package
-# with different version of your current installed package and
-# also this package isnt in the packages folder, then the new
-# package is applied; if in doubt, just say no or leave blank.
-# Otherwise set it either to "yes" or "1" and remember that if
-# enables this feature can cause problems if you use more than
-# one REPOS definition for each ARCH and VERSION.
-# Also, this option can be very slow.
+# Enabling this option (i.e, setting to "1" or "yes"), simplaret will
+# look at your standard repositories for new packages; if it find a
+# package with different version of your current installed package and
+# also this package isnt in the packages folder, then the new package
+# is applied; if in doubt, just say no or leave blank. Otherwise set it
+# either to "yes" or "1" and remember that if enabling this feature can
+# cause problems if you use more than one REPOS definition for each
+# ARCH and VERSION. Also, this option can be very slow.
 CONSIDER_ALL_PACKAGES_AS_PATCHES="0"
 
+# Enabling this option (i.e, setting to "1" or "yes"), simplaret will
+# store patches it finds on ROOT repositories on
+#
+#   $PATCHES_DIR/$ARCH/$VERSION/root-$repository_name.
+#
+# By default this option is turned off because it breaks the standard
+# way to store packages and can cause some confusion, but its an useful
+# feature if you like to see all patches apart from common packages and/or
+# stored in the same tree.
+STORE_ROOT_PATCHES_ON_PATCHES_DIR="0"
+
index d97ff75cad428464ba4d02d48dcbb6f370cce452..5c7cc98257460efdf55530880e894f489eaa06c0 100644 (file)
@@ -1,10 +1,14 @@
 simplepkg changelog
 -------------------
 
-0.4.9pre18-21: simplaret:
+0.4.9pre24: simplaret:
+            - new config variable STORE_ROOT_PATCHES_ON_PATCHES_DIR
+
+0.4.9pre18-23: simplaret:
                - enhanced http retrieval: curl support
                - enhanced verbosity
                - get-patches small changes
+               - various fixes
 
 0.4.9pre10-17: lots of simplaret fixes
 
index a729472a07a0ade9f4eb05d9783133f9712de72d..8292cb85b363f697fbc6b3376405e64ec9c965c0 100644 (file)
@@ -187,6 +187,9 @@ function eval_config {
 
   if [ -f "$CONF" ]; then
 
+    DEFAULT_ARCH="`eval_parameter DEFAULT_ARCH $(default_arch)`"
+    DEFAULT_VERSION="`eval_parameter DEFAULT_VERSION $(default_version)`"
+
     STORAGE="`eval_parameter STORAGE /var/simplaret/packages`"
     JAIL_ROOT="`eval_parameter JAIL_ROOT /vservers`"
     PATCHES_DIR="`eval_parameter PATCHES_DIR /var/simplaret/patches`"
@@ -201,13 +204,13 @@ function eval_config {
     SIMPLARET_UPDATE="`eval_boolean_parameter SIMPLARET_UPDATE 0`"
     SIMPLARET_DELETE_DURING="`eval_boolean_parameter SIMPLARET_DELETE_DURING 0`"
     SIMPLARET_PURGE_PATCHES="`eval_boolean_parameter SIMPLARET_PURGE_PATCHES 0`"
-    CONSIDER_ALL_PACKAGES_AS_PATCHES="`eval_boolean_parameter CONSIDER_ALL_PACKAGES_AS_PATCHES 0`"
-    DOWNLOAD_EVEN_APPLIED_PATCHES="`eval_boolean_parameter DOWNLOAD_EVEN_APPLIED_PATCHES 0`"
     PASSIVE_FTP="`eval_boolean_parameter PASSIVE_FTP 0`"
     WARNING="`eval_boolean_parameter WARNING 0`"
 
-    DEFAULT_ARCH="`eval_parameter DEFAULT_ARCH $(default_arch)`"
-    DEFAULT_VERSION="`eval_parameter DEFAULT_VERSION $(default_version)`"
+    # Enabling this option (i.e, setting to "1" or "yes"), simplaret will
+    # donwload even # already applied patches, a good option when you plan
+    # to keep local copies of all needed patches for your system
+    DOWNLOAD_EVEN_APPLIED_PATCHES="`eval_boolean_parameter DOWNLOAD_EVEN_APPLIED_PATCHES 0`"
 
     # Enabling this option, jail-upgrade will look at your
     # standard repositories for new packages; if it find a package
@@ -216,6 +219,17 @@ function eval_config {
     # package is apllied; if in doubt, just say no or leave blank.
     CONSIDER_ALL_PACKAGES_AS_PATCHES="`eval_boolean_parameter CONSIDER_ALL_PACKAGES_AS_PATCHES 0`"
 
+    # Enabling this option (i.e, setting to "1" or "yes"), simplaret will
+    # store patches it finds on ROOT repositories on
+    #
+    #   $PATCHES_DIR/$ARCH/$VERSION/root-$repository_name.
+    #
+    # By default this option is turned off because it breaks the standard
+    # way to store packages and can cause some confusion, but its an useful
+    # feature if you like to see all patches apart from common packages and/or
+    # stored in the same tree.
+    STORE_ROOT_PATCHES_ON_PATCHES_DIR="`eval_boolean_parameter STORE_ROOT_PATCHES_ON_PATCHES_DIR 0`"
+
     # now we place "patches" on the top of ROOT_PRIORITY
     ROOT_PRIORITY="patches `echo $ROOT_PRIORITY | sed -e 's/patches//'`"
 
index 110f8b252e922ee97f459f1d3da54b81db0c3bf1..d0295fd5ed57029fda83bb9472a84a9df30d58bb 100755 (executable)
@@ -6,7 +6,7 @@
 PACKAGE="simplepkg"
 PACK_DIR="package-$PACKAGE"
 BUILD=${BUILD:=1rha}
-VERSION="0.4.9pre22"
+VERSION="0.4.9pre23"
 ARCH="noarch"
 LIBEXEC="/usr/libexec/$PACKAGE"
 BINDIR="/usr/bin"
index d9fd1c83a403b978bb9bd41af351c264884cabc0..cb676f99956cb44c83525647e01b9b1303b0e34a 100755 (executable)
@@ -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