Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (3f46ec43345c225113b764a16292faa68539f22f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (3f46ec43345c225113b764a16292faa68539f22f)
  • Date: Wed, 30 Jan 2008 11:12:39 -0600

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 3 +++
var/lib/sorcery/modules/dl_handlers/dl_wget | 11 +++++++++--
var/lib/sorcery/modules/url_handlers/url_http | 10 ++++++++--
3 files changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 3f46ec43345c225113b764a16292faa68539f22f
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

* url_http: pass along all the arguments in url_https_verify
* dl_wget: pass hints to dl_wget_set_options and use them
* url_http, dl_wget: support the no-check-certificate source hint
#14106

diff --git a/ChangeLog b/ChangeLog
index 4d9b23a..44d7b69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
md5 log (flak from #13835)
* confmeld: improved the output (more spacing and better messages)
* liburl: pass along all the arguments in url_verify
+ * url_http: pass along all the arguments in url_https_verify
+ * dl_wget: pass hints to dl_wget_set_options and use them
+ * url_http, dl_wget: support the no-check-certificate source hint
#14106

2008-01-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* local/README: fixed typo
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_wget
b/var/lib/sorcery/modules/dl_handlers/dl_wget
index d6d740d..9272aa3 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_wget
+++ b/var/lib/sorcery/modules/dl_handlers/dl_wget
@@ -36,7 +36,7 @@ function dl_wget_get() {

for url in $url_list; do
local WGET_OPTIONS
- dl_wget_set_options $url
+ dl_wget_set_options $url $hints
dl_wget_call_wget $target $url
rc=$?
[[ $rc == 0 ]] && break
@@ -80,6 +80,8 @@ function dl_wget_call_wget() {
#---------------------------------------------------------------------
function dl_wget_set_options() {
local URL=$1
+ local hints="$2"
+
if [ -n "$ACTIVE_FTP" ] ; then
unset PASSIVE
else
@@ -114,10 +116,15 @@ function dl_wget_set_options() {
URL_HTTP_RETRIES="-t 3"
fi

+ local check_certificate
+ if list_find "$hints" no-check-certificate; then
+ check_certificate=--no-check-certificate
+ fi
+
ONLY_NEWER=""
DEREF_SYM="--retr-symlinks"

- WGET_OPTIONS="$URL_HTTP_TIMEOUT $URL_HTTP_RETRIES $NO_CACHE $RATE $PASSIVE
$CONTINUE $ONLY_NEWER $DEREF_SYM"
+ WGET_OPTIONS="$URL_HTTP_TIMEOUT $URL_HTTP_RETRIES $NO_CACHE $RATE $PASSIVE
$CONTINUE $ONLY_NEWER $DEREF_SYM $check_certificate"
debug 'dl_wget' "wget options: $WGET_OPTIONS"
}
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/url_handlers/url_http
b/var/lib/sorcery/modules/url_handlers/url_http
index 5f2d5ac..c1740ed 100755
--- a/var/lib/sorcery/modules/url_handlers/url_http
+++ b/var/lib/sorcery/modules/url_handlers/url_http
@@ -45,9 +45,15 @@ function url_https_bucketize() {
#---------------------------------------------------------------------
function url_http_verify() {
local URL=$1
+ local hints="$2"
+ local check_certificate
+
+ if list_find "$hints" no-check-certificate; then
+ check_certificate=--no-check-certificate
+ fi

if [ -n "$URL" ]; then
- if OUTPUT=`wget --passive-ftp -t 1 -T 30 --spider "$URL" 2>&1`; then
+ if OUTPUT=`wget --passive-ftp -t 1 -T 30 --spider $check_certificate
"$URL" 2>&1`; then
true
else
echo $OUTPUT
@@ -65,7 +71,7 @@ function url_http_verify() {
##
#---------------------------------------------------------------------
function url_https_verify() {
- url_http_verify $1
+ url_http_verify "$@"
}





  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (3f46ec43345c225113b764a16292faa68539f22f), Jaka Kranjc, 01/30/2008

Archive powered by MHonArc 2.6.24.

Top of Page