Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Jaka Kranjc (7226a2875d23bace82a2877913cafcf2331c5dc4)

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 quill by Jaka Kranjc (7226a2875d23bace82a2877913cafcf2331c5dc4)
  • Date: Thu, 19 Apr 2007 09:25:47 -0500

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

todo | 1
usr/bin/quill | 2 -
var/lib/quill/ChangeLog | 5 +++
var/lib/quill/modules/libcore | 56
+-----------------------------------------
var/lib/quill/version | 2 -
5 files changed, 9 insertions(+), 57 deletions(-)

New commits:
commit 7226a2875d23bace82a2877913cafcf2331c5dc4
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

* libcore: removed check_url and check_source_url for the better
url_verify
* libcore, quill: converted above calls to url_verify

diff --git a/todo b/todo
index 1a44499..bd2dd96 100644
--- a/todo
+++ b/todo
@@ -18,7 +18,6 @@ new menu choices

update mode:
* clean the namespace by moving more stuff into functions
- * research possible use of the sorcery url verification code
* plug other linters at the end of the update and move them all in liblint

improvements in the standard mode:
diff --git a/usr/bin/quill b/usr/bin/quill
index 38989f4..f405ed7 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -182,7 +182,7 @@ then

# check if WEB_SITE is reachable
WEB_SITE=$(. DETAILS &> /dev/null; echo $WEB_SITE)
- if ! check_url "$WEB_SITE"; then
+ if ! url_verify "$WEB_SITE" > /dev/null; then
error_msg "The website is not reachable: $WEB_SITE"
message "Fix it."
sleep 3
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index c0cd475..2b52281 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-18 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libcore: removed check_url and check_source_url for the better
url_verify
+ * libcore, quill: converted above calls to url_verify
+ * version: 0.2.4-rc16
+
2007-04-14 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libperlcpan, libfreshmeatxml, librubyraa: fix "retrieve" typos
* version: 0.2.4-rc15
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index f0b6fab..34b3944 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -246,8 +246,7 @@ function check_source_urls() {
message "Checking source urls (this may take a while) ..."
for su in $source_urls
do
- check_source_url "$su" "$i"
- if [[ $? == 0 ]]
+ if url_verify "$su" > /dev/null
then
message "SOURCE${i}_URL[0] is ok!"
rc=0
@@ -255,7 +254,7 @@ function check_source_urls() {
# first retry with a changed suffix
old_su="$su"
[[ ${su/.gz/.bz2} == $su ]] && su="${su/.bz2/.gz}" ||
su="${su/.gz/.bz2}"
- if check_source_url "$su" "$i"
+ if url_verify "$su" > /dev/null
then
message "SOURCE${i}_URL[0] is ok after changing the file extension!"
# tricky tricky - if we only change the url, it is likely
@@ -330,57 +329,6 @@ function check_source_urls() {
}

#---
-## @Synopsis checks if passed source url is valid
-##
-## @param source url
-## @param current source iterator
-##
-## @return 0 if source url either is valid or just not trivially checkable
-## @return 1 otherwise (http or ftp source url failure)
-##
-## @Globals none
-#---
-function check_source_url() {
- local rc su="$1" i="$2"
-
- if grep -q ftp:// <<< "$su"
- then
- wget -O - -S "${su%/*}/" -T 30 2>&1 | grep -q "${su##*/}"
- rc=$?
- elif grep -q http:// <<< "$su"
- then
- check_url "$su"
- rc=$?
- else
- message "SOURCE${i}_URL[0] is not a http or ftp link, assuming it works."
- rc=0
- fi
-
- return $rc
-}
-
-#---
-## @Synopsis checks if the url is reachable
-##
-## @param url
-##
-## @return 0 if it is ok
-## @return 1 otherwise
-##
-## @Globals none
-#---
-function check_url() {
- wget -S --spider -T 30 "$1" 2>&1 | grep -Eq "ERROR 404|service not
known|301 Moved"
- # reverse the return value, so the function returns 0 on succes
- if [[ $? == 1 ]]
- then
- return 0
- else
- return 1
- fi
-}
-
-#---
## @Synopsis dumps the default spell file function, taking into
## account that devel has a new spell file inheritance scheme
##
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 474cff3..a0fdc67 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2.4-rc15
+0.2.4-rc16



  • [SM-Commit] GIT changes to master quill by Jaka Kranjc (7226a2875d23bace82a2877913cafcf2331c5dc4), Jaka Kranjc, 04/19/2007

Archive powered by MHonArc 2.6.24.

Top of Page