aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/simplepkg.conf.new28
-rw-r--r--doc/CHANGELOG6
-rw-r--r--lib/common.sh22
-rwxr-xr-xsimplepkg.SlackBuild2
-rwxr-xr-xsrc/simplaret16
5 files changed, 53 insertions, 21 deletions
diff --git a/conf/simplepkg.conf.new b/conf/simplepkg.conf.new
index bf62450..51187ef 100644
--- a/conf/simplepkg.conf.new
+++ b/conf/simplepkg.conf.new
@@ -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"
+
diff --git a/doc/CHANGELOG b/doc/CHANGELOG
index d97ff75..5c7cc98 100644
--- a/doc/CHANGELOG
+++ b/doc/CHANGELOG
@@ -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
diff --git a/lib/common.sh b/lib/common.sh
index a729472..8292cb8 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -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//'`"
diff --git a/simplepkg.SlackBuild b/simplepkg.SlackBuild
index 110f8b2..d0295fd 100755
--- a/simplepkg.SlackBuild
+++ b/simplepkg.SlackBuild
@@ -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"
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