Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Andra?? Levstik (48d09e6a5aebece23212a22fbda0fbdd68b5fd8b)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andra?? Levstik <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Andra?? Levstik (48d09e6a5aebece23212a22fbda0fbdd68b5fd8b)
  • Date: Mon, 5 Mar 2007 16:39:34 -0600

GIT changes to master quill by Andra?? Levstik <ruskie AT mages.ath.cx>:

var/lib/quill/ChangeLog | 6 ++++++
var/lib/quill/modules/libdetails | 22 ++++++++++++++++++----
var/lib/quill/modules/libperlcpan | 14 +++++++++-----
var/lib/quill/version | 2 +-
4 files changed, 34 insertions(+), 10 deletions(-)

New commits:
commit 48d09e6a5aebece23212a22fbda0fbdd68b5fd8b
Author: Andra?? Levstik <ruskie AT mages.ath.cx>
Commit: Andra?? Levstik <ruskie AT mages.ath.cx>

minor fixes here and there

diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 387dc92..476e1fc 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-05 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
+ * libdetails: minor fixes to the src dir hunt code and
+ to the sf misc code
+ * libperlcpan: check if the current files are out of date by
+ more than a day then reload if necessary
+
2007-03-02 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* quill: simplified the various fetching modules code, now adding a
new one
requires only more parameter parsing and quill_help
diff --git a/var/lib/quill/modules/libdetails
b/var/lib/quill/modules/libdetails
index 1a8dd78..5d411f5 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -15,12 +15,26 @@ function query_spell_name(){

function query_spell_source_url(){
# misc sf fix
- SPELL_SRC_URL=$(sed
"s,http://prdownloads.sourceforge.net,$SOURCEFORGE_URL,"; <<< $SPELL_SRC_URL)
+ # try to handle as many sf url formats as possible
+ # I tested this with various URLs and it seems to work quite well
+ # if any oter are found should be included
+ # possibly split the code into a separate function???
+ SPELL_SRC_URL=$(sed -e
"s,http://prdownloads.sourceforge.net,$SOURCEFORGE_URL,"; \
+ -e
"s,http://downloads.sourceforge.net/\(.*\)?.*,$SOURCEFORGE_URL/\1," \
+ -e
"s,http://downloads.sourceforge.net/\(.*\),$SOURCEFORGE_URL/\1," \
+ -e "s,http://sourceforge.net/project/showfiles.php.*,,";
+ -e "s,/\(.*\)?.*,\1," \
+ <<< $SPELL_SRC_URL)
if ! [[ $SPELL_SRC_URL ]] ||
! query "Is $SPELL_SRC_URL the proper source url?" y; then
query_msg "Please enter the url of the source:"
read "SPELL_SRC_URL"
- SPELL_SRC_URL=$(sed
"s,http://prdownloads.sourceforge.net,$SOURCEFORGE_URL,"; <<< $SPELL_SRC_URL)
+ SPELL_SRC_URL=$(sed -e
"s,http://prdownloads.sourceforge.net,$SOURCEFORGE_URL,"; \
+ -e
"s,http://downloads.sourceforge.net/\(.*\)?.*,$SOURCEFORGE_URL/\1," \
+ -e
"s,http://downloads.sourceforge.net/\(.*\),$SOURCEFORGE_URL/\1," \
+ -e "s,http://sourceforge.net/project/showfiles.php.*,,";
+ -e "s,/\(.*\)?.*,\1," \
+ <<< $SPELL_SRC_URL)
fi
}

@@ -167,13 +181,13 @@ function hunt_src_dir(){
message "Checking for the source directory..."
compressor=$(guess_compressor ${QUILL_TMP_DIR}/${SPELL_SRC_FILE})
case "$compresor" in
- bzip2|gzip|compress*|tar) SPELL_SRC_DIR=$(tar tf
"${QUILL_TMP_DIR}/${SPELL_SRC_FILE}" | \
+ bzip2|gzip|compress*|tar) SPELL_SRC_DIR=$(tar vtf
"${QUILL_TMP_DIR}/${SPELL_SRC_FILE}" | \
grep / | \
sed -e "s=/.*$==g;q") || \
(error_msg "Error: getting
path from tarball" && \
return 1) ;;
*) SPELL_SRC_DIR=${SPELL}-${VERSION} &&
- message "Unsupported format" &&
+ message "Unsupported format..." &&
return 2 ;;
esac
message "Done.\n"
diff --git a/var/lib/quill/modules/libperlcpan
b/var/lib/quill/modules/libperlcpan
index 90a0b05..853a2f4 100644
--- a/var/lib/quill/modules/libperlcpan
+++ b/var/lib/quill/modules/libperlcpan
@@ -3,9 +3,13 @@
#---
function quill_get_cpan_meta()
{
- if [[ $FORCE_CPAN_DOWNLOAD == on ]] ||
- [ ! -f $QUILL_TMP_DIR/02packages.details.txt.gz ] ||
- [ ! -f $QUILL_TMP_DIR/03modlist.data.gz ]
+ # unless someone knows a better way to check files creation time
+ # this shoud work quite well
+ # basicaly update if the files are over a day old
+ if [[ ! "$(find ${QUILL_TMP_DIR}/02packages.details.txt.gz -ctime 0)" ==
"${QUILL_TMP_DIR}/02packages.details.txt.gz" ]] ||
+ [[ ! "$(find ${QUILL_TMP_DIR}/03modlist.data.gz -ctime 0)" ==
"${QUILL_TMP_DIR}/03modlist.data.gz" ]] ||
+ [[ ! -f $QUILL_TMP_DIR/02packages.details.txt.gz ]] ||
+ [[ ! -f $QUILL_TMP_DIR/03modlist.data.gz ]]
then
cd $QUILL_TMP_DIR
message "Attempting to retrive 02packages.details.txt.gz..."
@@ -30,8 +34,8 @@ function quill_cpan_core()
SPELL_NAME="$1"

quill_get_cpan_meta $1
- if zgrep -q -w -E "^${1}" $QUILL_TMP_DIR/02packages.details.txt.gz ||
- zgrep -q -w -E "^'${1}'" $QUILL_TMP_DIR/03modlist.data.gz
+ if ! zgrep -q -w -E "^${1}" $QUILL_TMP_DIR/02packages.details.txt.gz ||
+ ! zgrep -q -w -E "^'${1}'" $QUILL_TMP_DIR/03modlist.data.gz
then
SPELL_NAME="$(echo ${1} | sed -e 's/::/-/g')"
SPELL_SRC_URL="http://www.cpan.org/authors/id/${QUILL_CPAN_INFO[2]}";
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 7179039..5d87b90 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2.3
+0.2.3-2007-03-05



  • [SM-Commit] GIT changes to master quill by Andra?? Levstik (48d09e6a5aebece23212a22fbda0fbdd68b5fd8b), Andra?? Levstik, 03/05/2007

Archive powered by MHonArc 2.6.24.

Top of Page