aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/conf/repos.conf.new3
-rw-r--r--trunk/doc/CHANGELOG4
-rw-r--r--trunk/lib/common.sh3
-rwxr-xr-xtrunk/src/simplaret21
-rw-r--r--trunk/templates/vserver/vserver.d/var/www/htdocs/missing.html2
5 files changed, 24 insertions, 9 deletions
diff --git a/trunk/conf/repos.conf.new b/trunk/conf/repos.conf.new
index 930ff80..1d77419 100644
--- a/trunk/conf/repos.conf.new
+++ b/trunk/conf/repos.conf.new
@@ -1,5 +1,6 @@
#
# repository definitions for simplaret
+# please dont use any spaces inside a repository definition
#
# root repositories
@@ -24,7 +25,7 @@ PATCHES-x86_64-10.2="sarava%http://slack.sarava.org/packages/slamd64/slamd64-10.
# x86_64 10.2b
REPOS-x86_64-10.2b="sarava%http://slack.sarava.org/packages/slamd64/slamd64-10.2b/"
-PATCHES-x86_64-10.2b=""sarava%http://slack.sarava.org/packages/slamd64/slamd64-10.2b/patches/"
+PATCHES-x86_64-10.2b="sarava%http://slack.sarava.org/packages/slamd64/slamd64-10.2b/patches/"
# i386 11.0
REPOS-i386-11.0="sarava%http://slack.sarava.org/packages/slackware/slackware-11.0/"
diff --git a/trunk/doc/CHANGELOG b/trunk/doc/CHANGELOG
index afc190a..76bd63b 100644
--- a/trunk/doc/CHANGELOG
+++ b/trunk/doc/CHANGELOG
@@ -11,6 +11,10 @@ simplepkg changelog
- lspkg:
- small bugfix
+ - common.sh:
+ - on search_template, doesnt return a template from
+ defaults/ if the function is called with --update
+
0.5pre9 - 0.5pre13
==================
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 2680cff..f331e56 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -391,7 +391,8 @@ function search_template {
TEMPLATE_BASE="$TEMPLATE_FOLDER/$1"
elif [ -f "$TEMPLATE_FOLDER/$1/$1.template" ]; then
TEMPLATE_BASE="$TEMPLATE_FOLDER/$1/$1"
- elif [ -f "$BASE_CONF/defaults/templates/$1/$1.template" ]; then
+ elif [ -f "$BASE_CONF/defaults/templates/$1/$1.template" ] && \
+ [ "$2" != "--update" ]; then
TEMPLATE_BASE="$BASE_CONF/defaults/templates/$1/$1"
else
if [ "$2" == "--new" ]; then
diff --git a/trunk/src/simplaret b/trunk/src/simplaret
index 374c988..719063c 100755
--- a/trunk/src/simplaret
+++ b/trunk/src/simplaret
@@ -489,7 +489,7 @@ function simplaret_get {
# get a package
# usage: simplaret_get <package-name> [--silent]
- local silent generate_patches
+ local silent generate_patches search search_results
# prevent user to stay in $storage
cd
@@ -507,7 +507,13 @@ function simplaret_get {
done
# then search for the package in the repositories
- for result in `simplaret_search $1 --formatted`; do
+ search="`simplaret_search $1 --formatted`"
+ search_results="`echo $search | bc -l`"
+
+ for result in $search; do
+
+ # remaining search results
+ let search_results--
file="`echo $result | cut -d , -f 1`"
repos_type="`echo $result | cut -d , -f 2`"
@@ -558,11 +564,14 @@ function simplaret_get {
if [ "$2" != "--silent" ]; then
echo Error downloading $candidate from $repos_type repository $repository_url, please check your settings
fi
- # TODO: must check if there's also more repositories to try,
- # otherwise this function will never return an error code
- #if [ "$SIMPLARET_DOWNLOAD_FROM_NEXT_REPO" != "1" ]; then
+ # check if there's also more repositories to try
+ if [ "$SIMPLARET_DOWNLOAD_FROM_NEXT_REPO" != "1" ]; then
return 1
- #fi
+ else
+ if (($search_results <= 0)); then
+ return 1
+ fi
+ fi
else
LAST_DOWNLOADED_PACKAGE="$folder/$candidate"
if [ "$2" != "--silent" ]; then
diff --git a/trunk/templates/vserver/vserver.d/var/www/htdocs/missing.html b/trunk/templates/vserver/vserver.d/var/www/htdocs/missing.html
index b2eec17..2762324 100644
--- a/trunk/templates/vserver/vserver.d/var/www/htdocs/missing.html
+++ b/trunk/templates/vserver/vserver.d/var/www/htdocs/missing.html
@@ -5,7 +5,7 @@
<body>
<center>
<pre>
- O endere&ccedil;o que voc&ecirc; requisitou n&atilde;o p&ocirc;de ser encontrado :(
+ File not found.
</pre>
</center>
</body>