Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Ismael Luceno (423760b8e0d503f5d5e49fb8a411e7e6cb14e364)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Ismael Luceno (423760b8e0d503f5d5e49fb8a411e7e6cb14e364)
  • Date: Mon, 17 Oct 2016 18:22:40 +0000

GIT changes to master quill by Ismael Luceno <ismael AT sourcemage.org>:

usr/bin/quill | 12 +++++-------
var/lib/quill/modules/libdetails | 17 +++++++++++------
var/lib/quill/modules/site_handlers/libperlcpan | 2 +-
3 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 423760b8e0d503f5d5e49fb8a411e7e6cb14e364
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libdetails: Fix parsing non-prefixed version

commit 4668bcd70ba8af87da7349d3d684b34a4dbc64fa
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

quill: Fix parsing of Github URLs

commit 7fde6d5e316f65524315553da31d38697ce7922c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libperlcpan: Prefix spell name with "perl-"

commit 8fac51fda3b566617b6a0c31ad9579c7ab38c32b
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libdetails: Improve parsing of SPELL_SRC_FILE

Get rid of the SPELL_SANITIZED_FILE_NAME variable, and parse Github-style
URLs correctly.

diff --git a/usr/bin/quill b/usr/bin/quill
index 7bf5f26..79167cf 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -103,6 +103,10 @@ if [[ -z $QUILL_TARGET ]]; then
SPELL_SRC_URL="$1"
QUILL_ORIG_TARGET=$(sed -r 's@\.git$@@;s@.*/@@' <<< "$1")
;;
+ https://github.com/*/archive/*)
+ SPELL_SRC_URL="$1"
+ QUILL_ORIG_TARGET=$(awk -F/ '{print $(NF-2)}' <<< "$1")
+ ;;
*:*)
SPELL_SRC_URL="$1"
QUILL_ORIG_TARGET=$(sed -r '
@@ -426,16 +430,10 @@ else # no updates, we'll be making a spell

# redo it for QUILL_FETCH_MODE, perhaps it didn't fetch a valid source url
# first time for other modes
- parse_spell_source_file_info
- while [[ -z $SPELL_SANITIZED_FILE_NAME ]]; do
- if [[ -n $SPELL_SRC_FILE ]]; then
- SPELL_SANITIZED_FILE_NAME=$SPELL_SRC_FILE
- break
- fi
+ while ! parse_spell_source_file_info; do
error_msg "Source file couldn't be found. Check that the url is valid
and downloadable!\n"
unset SPELL_SRC_URL
query_spell_source_url
- parse_spell_source_file_info
done
show_spell_source_file_info
echo
diff --git a/var/lib/quill/modules/libdetails
b/var/lib/quill/modules/libdetails
index dd6ff13..517c948 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -124,21 +124,26 @@ fi
## @Synopsis Assign to SPELL_SRC_FILE the filename and to VERSION the
## @Synopsis version number parsed from source url.
##
-## @Globals SPELL_SRC_FILE SPELL_SANITIZED_FILE_NAME SPELL_VERSION
+## @Globals SPELL_SRC_FILE SPELL_VERSION
#---
function parse_spell_source_file_info(){
- SPELL_SRC_FILE=$(expr "$SPELL_SRC_URL" : '.*/\(.*\)')
- SPELL_SANITIZED_FILE_NAME=$(expr "$SPELL_SRC_FILE" : '\(.*\)[-|_][0-9]')
- SPELL_VERSION=$(expr "$SPELL_SRC_FILE" :
"${SPELL_SANITIZED_FILE_NAME}[-|_]\(.*\)\.[t|z|r]")
+ SPELL_SRC_FILE="${SPELL_SRC_URL##*/}"
+ if expr "$SPELL_SRC_FILE" : 'v[0-9]\.' >/dev/null; then
+ SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : 'v\(.*\)\.[rtz]')
+ elif expr "$SPELL_SRC_FILE" : '[0-9]\.' >/dev/null; then
+ SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : '\(.*\)\.[rtz]')
+ else
+ SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : ".*[-_]\([0-9].*\)\.[rtz]")
+ fi
+ [[ -n $SPELL_SRC_FILE ]]
}

#---
## @Synopsis Print on screen info gathered from source url.
##
-## @Globals SPELL_SANITIZED_FILE_NAME SPELL_VERSION SPELL_SRC_URL
+## @Globals SPELL_VERSION SPELL_SRC_URL
#---
function show_spell_source_file_info(){
- message "Sanitized filename: ${SPELL_SANITIZED_FILE_NAME}"
message "Version: ${SPELL_VERSION}"
message "URL: ${SPELL_SRC_URL}"
}
diff --git a/var/lib/quill/modules/site_handlers/libperlcpan
b/var/lib/quill/modules/site_handlers/libperlcpan
index b5830da..e17305d 100644
--- a/var/lib/quill/modules/site_handlers/libperlcpan
+++ b/var/lib/quill/modules/site_handlers/libperlcpan
@@ -70,7 +70,7 @@ function quill_cpan_core()

SPELL_URL="http://search.cpan.org/~${QUILL_CPAN_METADATA[7]}/${SPELL_NAME}/";
local description
description="${QUILL_CPAN_METADATA[6]}"
- SPELL_NAME="${1//::/-}" # the lower case target wasn't manipulated yet
+ SPELL_NAME="perl-${1//::/-}" # the lower case target wasn't manipulated
yet
echo $description > ${QUILL_TMP_DIR}/${SPELL_NAME}
BUILDISON="BUILD, "
touch ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD



  • [SM-Commit] GIT changes to master quill by Ismael Luceno (423760b8e0d503f5d5e49fb8a411e7e6cb14e364), Ismael Luceno, 10/17/2016

Archive powered by MHonArc 2.6.24.

Top of Page