Skip to Content.
Sympa Menu

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

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 (45c517f325dbb541bfdcac8a58aec13b6d8f4d43)
  • Date: Mon, 9 Apr 2007 08:20:40 -0500

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

todo | 5 +-
usr/bin/quill | 19 +++++----
var/lib/quill/ChangeLog | 11 +++++
var/lib/quill/modules/libbuild | 12 ++++--
var/lib/quill/modules/libconflicts | 6 ++-
var/lib/quill/modules/libcopy | 4 +-
var/lib/quill/modules/libcore | 67
++++++++++++++++++++++++++++------
var/lib/quill/modules/libdepends | 51 +++++++++++++++----------
var/lib/quill/modules/libdesktop | 6 +++
var/lib/quill/modules/libdetails | 39 +++++++++++++++++--
var/lib/quill/modules/libfreshmeatxml | 6 +++
var/lib/quill/modules/libhistory | 10 +++++
var/lib/quill/modules/libinstall | 8 +++-
var/lib/quill/modules/libperlcpan | 9 ++++
var/lib/quill/modules/libpre_build | 6 ++-
var/lib/quill/modules/libprepare | 4 ++
var/lib/quill/modules/libprovides | 8 +++-
var/lib/quill/modules/librubyraa | 5 ++
var/lib/quill/modules/libupdate | 27 ++++++++-----
var/lib/quill/version | 2 -
20 files changed, 232 insertions(+), 73 deletions(-)

New commits:
commit 45c517f325dbb541bfdcac8a58aec13b6d8f4d43
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

* libupdate: renamed if_var to the more clear version_switch
* libdetails: fixed hunt_src_dir error case
* all: added @Globals, made some variables local, renamed some for
clarity
* quill: simplified the andand_lines DEPENDS test
* libbuild: fix bad quoting for scons
* libdepends: simplified query_spell_dependencies

diff --git a/todo b/todo
index 6de9474..57a37e3 100644
--- a/todo
+++ b/todo
@@ -9,13 +9,12 @@ new menu choices
SCM: wierd versions; also needs the autoupdate stuff; only for -w

* 'Convert to upstream signing'
- try automatically on updates (check for .sig)?
+ try automatically on updates (check for .sig. .asc)?

* 'list/remove files?'

update mode:
- * clean the namespace by moving more stuff into functions, using locals and
- documenting global vars used in all functions
+ * clean the namespace by moving more stuff into functions

improvements in the standard mode:
* use some of the functions from update mode,
diff --git a/usr/bin/quill b/usr/bin/quill
index ef94bed..14954a0 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -11,14 +11,14 @@
## @ToDo Make quill the be-all for spells
##
## Asks the user in simple questions about generating a spell.
-## @Globals BUILDISON, INSTALLISON, PREBUILDISON, TRIGGERSISON
-## @Globals SPELL_HISTORY_NAME, SPELL_HISTORY_EMAIL, SPELL_NAME,
-## @Globals SPELL_SRC_URL, SPELL_LICENSE, SPELL_URL, SPELL_SHORT_DESCRIPTION,
-## @Globals SPELL_DESCRIPTION, SPELL_DEPENDENCIES,
SPELL_OPTIONAL_DEPENDENCIES,
-## @Globals SPELL_CONFLICTS, HISOTRY_DATE, SPELL_SRC_FILE,
-## @Globals SPELL_SANITIZED_FILE_NAME, SPELL_MD5_UNPACKED, SPELL_VERSION,
-## @Globals i, j, n, BUILD_DTFILE, DTFILE_MENUENTRY, DTFILE_EXEC
-## @Globals DTFILE_MENUPATH, DTFILE_ICON, DTFILE_TERM, SPELL_SRC_DIR
+## @Globals QUILL_VERSION QUILL_MODE HISTORY_DATE QUILL_HOME_DIR
QUILL_QUILLRC
+## @Globals QUILL_OLD_QUILLRC QUILL_SPELL_DIR QUILL_TMP_DIR QUILL_LIB_DIR
+## @Globals QUILL_MODULES QUILL_CONFIG_VERSION QUILL_OUR_CONFIG_VERSION
EDITOR
+## @Globals QUILL_FETCH_MODE QUILL_TARGET QUILL_UPDATE PROMPT_DELAY BUILD_API
+## @Globals SPELL_UPDATED SPELL_NAME actions ANSWER WEB_SITE GRIMOIRE SECTION
+## @Globals SPELL_DEPENDENCIES SPELL_OPTIONAL_DEPENDENCIES SPELL_CONFLICTS
+## @Globals SPELL_PROVIDES PREPAREISON PREBUILDISON BUILDISON SPELL_SRC_FILE
+## @Globals INSTALLISON BS BUILD_DTFILE
##
## @Thanks BearPerson, dufflebunk, afrayedknot
## @Thanks To all testers
@@ -105,6 +105,7 @@ for i in /var/lib/quill/modules/lib*
do
. $i
done
+unset i

quill_rc
if [[ ${QUILL_CONFIG_VERSION/0.2.2/1} != $QUILL_OUR_CONFIG_VERSION ]]; then
@@ -326,7 +327,7 @@ else
fi

# add && where appropriate in DEPENDS
- if [[ ${SPELL_OPTIONAL_DEPENDENCIES} != "" ]] || [[ ${SPELL_DEPENDENCIES}
!= "" ]]
+ if [[ -e DEPENDS ]]
then
andand_lines DEPENDS
fi
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index ebe947e..00cb494 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-09 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libupdate: renamed if_var to the more clear version_switch
+ * libdetails: fixed hunt_src_dir error case
+ * all: added @Globals, made some variables local, renamed some for
clarity
+ * quill: simplified the andand_lines DEPENDS test
+ * libbuild: fix bad quoting for scons
+ * libdepends: simplified query_spell_dependencies
+ * version: 0.2.4-rc12
+
2007-03-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* quill: made the grimoire/section checks a while loop
refactored it all out into a copy_new_to_git function
@@ -38,7 +47,7 @@
* libcore: fixed saved sudo and gpg default query answer
fixed versioning to not loop anymore
factored andand_lines out of quill
- * libdetails: beautified hunt_src_dir, add_details dpesn't unexpand
globals
+ * libdetails: beautified hunt_src_dir, add_details doesn't unexpand
globals
* libbuild: started work on detect_build_system and
implement_build_system
* quill: fake call detect_build_system; TODO: INSTALL, DEPENDS
* version: 0.2.4-rc1
diff --git a/var/lib/quill/modules/libbuild b/var/lib/quill/modules/libbuild
index a291d7e..eb73f1c 100644
--- a/var/lib/quill/modules/libbuild
+++ b/var/lib/quill/modules/libbuild
@@ -2,8 +2,8 @@
## @Synopsis BUILD module for quill
#---

-BUILDISON=""
-
+##
+## @Globals QUILL_FETCH_MODE BUILDISON
function query_spell_build() {
if [[ "$QUILL_FETCH_MODE" != "cpan" ]]; then
if query "Will you be adding a custom BUILD file:" "n"
@@ -13,6 +13,8 @@ function query_spell_build() {
fi
}

+##
+## @Globals QUILL_FETCH_MODE QUILL_TMP_DIR QUILL_SPELL_DIR SPELL_NAME EDITOR
function add_build() {
if [[ "$QUILL_FETCH_MODE" == "cpan" ]]; then
cp ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
@@ -30,6 +32,8 @@ function add_build() {
#---
## @Synopsis ask and try to detect the build system by checking for marker
## @Synopsis files in the tarball
+##
+## @Globals QUILL_TMP_DIR SPELL_NAME SPELL_SRC_FILE SPELL_SRC_DIR
#---
function detect_build_system() {
local bs SPELL SOURCE_CACHE
@@ -88,6 +92,8 @@ function detect_build_system() {
#---
## @Synopsis creates a BUILD file according to the build system used
## @Synopsis unless it is make,configure (default_build)
+##
+## @Globals none
#---
function implement_build_system() {
local bs=$1
@@ -113,7 +119,7 @@ FEO
PerL) echo "perl Makefile.PL" >> BUILD ;;
python) echo "python setup.py" >> BUILD ;;
waf) echo "waf_build" >> BUILD ;;
- scons) echo "scons PREFIX=$INSTALL_ROOT/usr" >> BUILD ;;
+ scons) echo 'scons PREFIX=$INSTALL_ROOT/usr' >> BUILD ;;
jam) echo "jam" >> BUILD ;;
make) echo "make" >> BUILD ;;
esac
diff --git a/var/lib/quill/modules/libconflicts
b/var/lib/quill/modules/libconflicts
index 9b3bf69..0de83e3 100644
--- a/var/lib/quill/modules/libconflicts
+++ b/var/lib/quill/modules/libconflicts
@@ -3,13 +3,15 @@
## @Note DONE
#---

-CONFLICTSISON=""
-
+##
+## @Globals SPELL_CONFLICTS
function query_spell_conflicts() {
query_msg "Please enter all conflicting spell names if any:"
read "SPELL_CONFLICTS"
}

+##
+## @Globals CONFLICTSISON SPELL_CONFLICTS
function add_conflicts() {
touch CONFLICTS
CONFLICTSISON="CONFLICTS, "
diff --git a/var/lib/quill/modules/libcopy b/var/lib/quill/modules/libcopy
index 4d524f3..d6a668d 100644
--- a/var/lib/quill/modules/libcopy
+++ b/var/lib/quill/modules/libcopy
@@ -34,7 +34,7 @@ function copy_new_to_git()
#---
## @Synopsis Finds the spell under $QUILL_GIT_DIR
##
-## @Globals QUILL_GIT_DIR SPELL_NAME
+## @Globals QUILL_GIT_DIR SPELL_NAME GRIMOIRE2 SECTION2
#---
function copy_git_sub()
{
@@ -82,7 +82,7 @@ function copy_to_git()
#---
## @Synopsis Copies the spell from $QUILL_GIT_DIR to $QUILL_SPELL_DIR
##
-## @Globals QUILL_GIT_DIR SPELL_NAME QUILL_SPELL_DIR SPELL_UPDATED
+## @Globals SPELL_NAME QUILL_SPELL_DIR SPELL_UPDATED
#---
function copy_from_git()
{
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 8155ef7..1f7a705 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -4,6 +4,8 @@
## $2 - the VARIABLE to which to store the answer
## $3 - the default answer
## $4...$n - the options for the list
+##
+## @Globals none
#---
function query_list()
{
@@ -15,6 +17,8 @@ function query_list()

#---
## @Synopsis generate basic spell dir
+##
+## @Globals QUILL_SPELL_DIR SPELL_NAME DEPENDSISON CONFLICTSON
#---
function create_spell_base(){
mkdir -p ${QUILL_SPELL_DIR}/${SPELL_NAME}
@@ -27,8 +31,10 @@ function create_spell_base(){

#---
## @Synopsis download spell's source file
+##
+## @Globals QUILL_TMP_DIR QUILL_SPELL_DIR SPELL_SRC_FILE SPELL_SRC_URL
+## @Globals SPELL_NAME
#---
-
function get_spell_source(){
mkdir -p ${QUILL_TMP_DIR}
cd ${QUILL_TMP_DIR}
@@ -47,8 +53,8 @@ function get_spell_source(){
#---
## @Synopsis Print the sha512 hash, a simplified gpg_hashsum
##
+## @Globals none
#---
-
function quill_hash_get() {
gpg --print-md sha512 "$@" | tr -d '\n ' | tr 'A-F' 'a-f' | cut -d: -f2
}
@@ -56,8 +62,11 @@ function quill_hash_get() {
#---
## @Synopsis Get's gurus info and stuff and puts it into
## @Synopsis $QUILL_QUILLRC or reads it from there
+##
+## @Globals QUILL_OLD_QUILLRC QUILL_QUILLRC QUILL_MODE QUILL_HOME_DIR
+## @Globals GURU_NAME GURU_EMAIL GURU_GPGKEY QUILL_SPELL_DIR QUILL_GIT_DIR
+## @Globals QUILL_OUR_CONFIG_VERSION QUILL_SUDO
#---
-
function quill_rc() {
local saved
if [[ -f ${QUILL_OLD_QUILLRC} ]]
@@ -123,6 +132,8 @@ QUA

#---
## @Synopsis The welcome message for quill
+##
+## @Globals QUILL_SPELL_DIR
function quill_welcome() {
message "Welcome to SourceMage GNU/Linux quill - a spell creator and
updater script."
message
"-----------------------------------------------------------------------------"
@@ -138,6 +149,8 @@ function quill_welcome() {

#---
## @Synopsis used to edit spell files
+##
+## @Globals EDITOR QUILL_SPELL_DIR SPELL_NAME
#---
function quill_edit() {
local spell_file type
@@ -157,35 +170,45 @@ function quill_edit() {

#---
## @Synopsis generate a tarball of the spell
+##
+## @Globals QUILL_SPELL_DIR SPELL_NAME
#---
function quill_final_tarball() {
- message "Now creating a bziped2 tarball of the spell files"
+ message "Now creating a bziped2 tarball of the spell files ..."
cd ${QUILL_SPELL_DIR}
tar -jcvf ${SPELL_NAME}.tar.bz2 ${SPELL_NAME}
if [[ $? != 0 ]]; then
- error_msg "Failed to create spell tarball"
+ error_msg "Failed to create spell tarball."
else
- message "Spell tarball created successfully"
+ message "Spell tarball created successfully."
fi
}

#---
## @Synopsis function to chmod +x all the relevant spell files
+##
+## @Globals QUILL_SPELL_DIR SPELL_NAME
#---
function quill_set_executable_bit() {
- for SPELL_FILE in ${QUILL_SPELL_DIR}/${SPELL_NAME}/*
+ local spell_file
+
+ for spell_file in $QUILL_SPELL_DIR/$SPELL_NAME/*
do
- if [[ "$SPELL_FILE" != "${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY" ]]
+ if [[ "$spell_file" != "$QUILL_SPELL_DIR/$SPELL_NAME/HISTORY" ]]
then
- chmod +x $SPELL_FILE
+ chmod +x $spell_file
fi
done
}

#---
## @Synopsis cleans out $QUILL_TMP_DIR and/or $QUILL_SPELL_DIR
+##
+## @Globals QUILL_TMP_DIR QUILL_SPELL_DIR
#---
function quill_purge() {
+ local rc
+
quill_rc
message -n "Purging ... "
if [[ $1 == "tmp" ]]
@@ -212,8 +235,10 @@ function quill_purge() {
## @Synopsis checks if spell source urls are valid
## @Synopsis and perhaps changes them if they are trivially fixable
##
-## @return 0 if all source urls are either valid or just not trivially
checkable
+## @return 0 if all source urls are either valid or not trivially checkable
## @return 1 otherwise
+##
+## @Globals SPELL_VERSION SPELL_NAME "source_urls" "sources_and_urls"
"version"
#---
function check_source_urls() {
local i= su old_su oldest_su source old_source rc
@@ -311,6 +336,8 @@ function check_source_urls() {
##
## @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"
@@ -338,6 +365,8 @@ function check_source_url() {
##
## @return 0 if it is ok
## @return 1 otherwise
+##
+## @Globals none
#---
function check_url() {
wget -S --spider "$1" 2>&1 | grep -Eq "ERROR 404|service not known|301
Moved"
@@ -353,6 +382,8 @@ function check_url() {
#---
## @Synopsis dumps the default spell file function, taking into
## account that devel has a new spell file inheritance scheme
+##
+## @Globals none
#---
function dump_default_function() {
if ! declare -f real_default_sorcery_$1; then
@@ -363,6 +394,8 @@ function dump_default_function() {

#---
## @Synopsis function that displays the version and exits
+##
+## @Globals QUILL_VERSION
#---
function quill_version() {

@@ -391,6 +424,8 @@ Arjan 'abouter' Bouter
## @Synopsis if not, saves it in QUILL_TARGET
## Don't touch capitalisation... each module should
## handle that on it's own
+##
+## @Globals QUILL_TARGET
#---
function check_parameter() {
[[ -z $1 ]] &&
@@ -407,6 +442,8 @@ function check_parameter() {
##
## @return 0 if it is a dir
## @return 1 otherwise
+##
+## @Globals none
#---
function dir_check() {
if [[ ! -d $1 ]]
@@ -424,6 +461,8 @@ function dir_check() {

#---
## @Synopsis adds && to all full lines not ending by and escape \ or last
line
+##
+## @Globals none
#---
function andand_lines() {
local file="$1"
@@ -437,6 +476,8 @@ function andand_lines() {

#---
## @Synopsis cleans out various special chars from html
+##
+## @Globals QUILL_MODULES
#---
function clear_html_specials(){
local file="$1"
@@ -445,6 +486,8 @@ function clear_html_specials(){

#---
## @Synopsis prints a colored error message
+##
+## @Globals none
#---
function error_msg() {
message "$PROBLEM_COLOR$@$DEFAULT_COLOR"
@@ -452,6 +495,8 @@ function error_msg() {

#---
## @Synopsis prints a colored query message
+##
+## @Globals none
#---
function query_msg() {
message "$QUERY_COLOR$@$DEFAULT_COLOR"
@@ -459,6 +504,8 @@ function query_msg() {

#---
## @Synopsis function that displays help and exits
+##
+## @Globals QUILL_VERSION
#---
function quill_help() {

diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index e8a2f9b..666c0ed 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -2,6 +2,8 @@
## @Synopsis libdepends
#---

+##
+## @Globals SPELL_DEPENDENCIES
function query_spell_dependencies() {
if ! [[ $SPELL_DEPENDENCIES ]] ||
! query "Are \"${SPELL_DEPENDENCIES}\" the proper dependencies for this
spell" y
@@ -9,19 +11,22 @@ function query_spell_dependencies() {
query_msg "Please enter the dependencies(non optional) \
of the spell if any:"
read "SPELL_DEPENDENCIES"
- SPELL_DEPENDENCIES=$(tr ',' ' ' <<< "$SPELL_DEPENDENCIES")
- SPELL_DEPENDENCIES=$(sort <<< "$SPELL_DEPENDENCIES")
- SPELL_DEPENDENCIES=$(uniq <<< "$SPELL_DEPENDENCIES")
+ SPELL_DEPENDENCIES=$(tr ',' ' ' <<< "$SPELL_DEPENDENCIES" | sort | uniq)
fi
}

+##
+## @Globals SPELL_OPTIONAL_DEPENDENCIES
function query_spell_optional_dependencies() {
- query_msg "Please enter the optional dependencies of the \
-spell if any:"
+ query_msg "Please enter the optional dependencies of the spell if any:"
read -a "SPELL_OPTIONAL_DEPENDENCIES"
}

+##
+## @Globals DEPENDSISON SPELL_DEPENDENCIES
function add_dependencies() {
+ local i
+
touch DEPENDS
DEPENDSISON="DEPENDS, "
for i in ${SPELL_DEPENDENCIES}
@@ -30,30 +35,36 @@ function add_dependencies() {
done
}

+##
+## @Globals DEPENDSISON SPELL_OPTIONAL_DEPENDENCIES
function add_optional_dependencies() {
+ local dep dep_count
+ local SPELL_OPTIONAL_DEPENDENCIES_ENABLED[0]=""
+ local SPELL_OPTIONAL_DEPENDENCIES_DISABLED[0]=""
+ local SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[0]=""
+
+ dep_count=${#SPELL_OPTIONAL_DEPENDENCIES[*]}
touch DEPENDS
DEPENDSISON="DEPENDS, "
- SPELL_OPTIONAL_DEPENDENCIES_ENABLED[0]=""
- SPELL_OPTIONAL_DEPENDENCIES_DISABLED[0]=""
- SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[0]=""
- NM=${#SPELL_OPTIONAL_DEPENDENCIES[*]}
- for ((MN=0; MN < $NM; MN++))
+ for ((dep=0; dep < $dep_count; dep++))
do
- query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a ./configure
enable option"
- read SPELL_OPTIONAL_DEPENDENCIES_ENABLED[$MN]
- query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a ./configure
disable option"
- read SPELL_OPTIONAL_DEPENDENCIES_DISABLED[$MN]
- query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a description"
- read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$MN]
+ query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a ./configure
enable option"
+ read SPELL_OPTIONAL_DEPENDENCIES_ENABLED[$dep]
+ query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a ./configure
disable option"
+ read SPELL_OPTIONAL_DEPENDENCIES_DISABLED[$dep]
+ query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a description"
+ read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$dep]

- message "optional_depends ${SPELL_OPTIONAL_DEPENDENCIES[$MN]} \\" >>
DEPENDS
- message "
\"${SPELL_OPTIONAL_DEPENDENCIES_ENABLED[$MN]}\" \\" >> DEPENDS
- message "
\"${SPELL_OPTIONAL_DEPENDENCIES_DISABLED[$MN]}\" \\" >> DEPENDS
- message "
\"${SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$MN]}\"" >> DEPENDS
+ message "optional_depends ${SPELL_OPTIONAL_DEPENDENCIES[$dep]} \\" >>
DEPENDS
+ message "
\"${SPELL_OPTIONAL_DEPENDENCIES_ENABLED[$dep]}\" \\" >> DEPENDS
+ message "
\"${SPELL_OPTIONAL_DEPENDENCIES_DISABLED[$dep]}\" \\" >> DEPENDS
+ message "
\"${SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$dep]}\"" >> DEPENDS
done
# "optional_depends ${j} \"enabled-option\" \"disabled-option\"
\"description\""
}

+##
+## @Globals
function add_bs_depends() {
return
}
diff --git a/var/lib/quill/modules/libdesktop
b/var/lib/quill/modules/libdesktop
index 7c01393..80d9657 100644
--- a/var/lib/quill/modules/libdesktop
+++ b/var/lib/quill/modules/libdesktop
@@ -2,6 +2,9 @@
## @Synopsis libdesktop
#---

+##
+## @Globals BUILD_DTFILE SPELL_NAME DTFILE_MENUENTRY DTFILE_EXEC
+## @Globals DTFILE_MENUPATH DTFILE_ICON DTFILE_TERM
query_spell_desktop_file() {
if query "Will you be adding a custom desktop file:" "n"
then
@@ -22,6 +25,9 @@ then
fi
}

+##
+## @Globals SPELL_NAME SPELL_SHORT_DESCRIPTION DTFILE_MENUENTRY SPELL_VERSION
+## @Globals DTFILE_EXEC DTFILE_ICON DTFILE_MENUPATH DTFILE_TERM
add_desktop_file() {
mkdir -p desktop
cd desktop
diff --git a/var/lib/quill/modules/libdetails
b/var/lib/quill/modules/libdetails
index ecd45c6..20781bc 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -1,10 +1,11 @@
#---
## @Synopsis libdetails
+## for all the fields that could be filled in, check if they were filled in
+## and if so, give the user an opportunity to change the value
#---

-# for all the fields that could be filled in, check if they were filled in
-# and if so, give the user an opportunity to change the value
-
+##
+## @Globals SPELL_NAME
function query_spell_name(){
#downcase before query
SPELL_NAME=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$SPELL_NAME")
@@ -17,6 +18,8 @@ function query_spell_name(){
fi
}

+##
+## @Globals SPELL_SRC_URL
function query_spell_source_url(){
# misc sf fix
# try to handle as many sf url formats as possible
@@ -44,7 +47,9 @@ if ! [[ $SPELL_SRC_URL ]] ||
fi
}

-# used in update mode only
+## used in update mode only, elsewhere the version is parsed from the
filename
+##
+## @Globals SPELL_VERSION
function query_spell_version(){
if ! [[ $SPELL_VERSION ]] ||
! query "Is $SPELL_VERSION the proper spell version?" y; then
@@ -53,6 +58,8 @@ function query_spell_version(){
fi
}

+##
+## @Globals SPELL_SIGNATURE DOWNLOAD_SIGNATURE
function query_spell_signature(){
if [[ $SPELL_SIGNATURE ]] &&
! query "Is $SPELL_SIGNATURE the proper signature key url?" y; then
@@ -73,6 +80,8 @@ if [[ $SPELL_SIGNATURE ]] &&
fi
}

+##
+## @Globals SPELL_LICENSE
function query_spell_license(){
if ! [[ $SPELL_LICENSE ]] ||
! query "Is $SPELL_LICENSE the proper license?" y; then
@@ -81,6 +90,8 @@ if ! [[ $SPELL_LICENSE ]] ||
fi
}

+##
+## @Globals SPELL_URL
function query_spell_url(){
if ! [[ $SPELL_URL ]] ||
! query "Is $SPELL_URL the proper website?" y; then
@@ -89,6 +100,8 @@ if ! [[ $SPELL_URL ]] ||
fi
}

+##
+## @Globals SPELL_SHORT_DESCRIPTION
function query_spell_short_description(){
if ! [[ $SPELL_SHORT_DESCRIPTION ]] ||
! ( message "${QUERY_COLOR}Is${DEFAULT_COLOR}\n$SPELL_SHORT_DESCRIPTION"
@@ -98,6 +111,8 @@ if ! [[ $SPELL_SHORT_DESCRIPTION ]] ||
fi
}

+##
+## @Globals EDITOR SPELL_NAME SPELL_DESC_NAME QUILL_TMP_DIR
function query_spell_description(){
local description=${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-${SPELL_NAME}}
if ! test -f $description ||
@@ -114,6 +129,8 @@ 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
#---
function parse_spell_source_file_info(){
SPELL_SRC_FILE=$(expr "$SPELL_SRC_URL" : '.*/\(.*\)')
@@ -123,6 +140,8 @@ function parse_spell_source_file_info(){

#---
## @Synopsis Print on screen info gathered from source url.
+##
+## @Globals SPELL_SANITIZED_FILE_NAME SPELL_VERSION SPELL_SRC_URL
#---
function show_spell_source_file_info(){
message "Sanitized filename: ${SPELL_SANITIZED_FILE_NAME}"
@@ -139,6 +158,8 @@ function show_spell_source_file_info(){
## @param the string to search for (variable contents)
## @param the replacement for said string (variable name)
## @param ...
+##
+## @Globals none
#---
function substitute_with_variables() {
if [[ -n $1 ]]; then
@@ -159,6 +180,8 @@ fi
## @Synopsis SUBSTITUTIONS. Urls and variables are parsed from contents
## @Synopsis of /etc/sorcery/mirrors/. Example:
## @Synopsis substitute_with_mirror_variables SPELL_SRC_URL
+##
+## @Globals none
#---
function substitute_with_mirror_variables(){
if [[ -n $1 ]]; then
@@ -181,6 +204,8 @@ fi
## @return 0 if found supported fromat and suceeded
## @return 1 if failed
## @return 2 if unsupported format
+##
+## @Globals QUILL_TMP_DIR SPELL_SRC_FILE SPELL_NAME SPELL_VERSION
SPELL_SRC_DIR
#---
function hunt_src_dir(){
local compressor
@@ -189,7 +214,7 @@ function hunt_src_dir(){

case "$compressor" in
bzip2|gzip|compress*|tar) true ;;
- *) SPELL_SRC_DIR=${SPELL}-${VERSION}
+ *) SPELL_SRC_DIR=${SPELL_NAME}-${SPELL_VERSION}
message "Unsupported format..."
return 2 ;;
esac
@@ -202,6 +227,10 @@ function hunt_src_dir(){

#---
## @Synopsis generate DETAILS file
+##
+## @Globals SPELL_SRC_URL SPELL_NAME SPELL_VERSION SPELL_SRC_DIR
SPELL_SRC_FILE
+## @Globals QUILL_TMP_DIR QUILL_SPELL_HASH SPELL_URL SPELL_LICENSE
HISTORY_DATE
+## @Globals SPELL_SHORT_DESCRIPTION SPELL_DESC_NAME
#---
function add_details(){
message "Generating the DETAILS file ..."
diff --git a/var/lib/quill/modules/libfreshmeatxml
b/var/lib/quill/modules/libfreshmeatxml
index afa7ab6..e440ae8 100644
--- a/var/lib/quill/modules/libfreshmeatxml
+++ b/var/lib/quill/modules/libfreshmeatxml
@@ -2,10 +2,16 @@
## @Synopsis libfreshmeatxml
#---

+##
+## @Globals none
function quill_fmxml_grab_from_xml() {
xml_grep --text_only "${1}" "${2}"
}

+##
+## @Globals SPELL_NAME FRESHMEAT_XML_URL FRESHMEAT_PROJECT_URL
SPELL_DESC_NAME
+## @Globals FRESHMEAT_PROJECT_FILE FRESHMEAT_FILE QUILL_TMP_DIR SPELL_SRC_URL
+## @Globals SPELL_SRC_URL SPELL_LICENSE SPELL_SHORT_DESCRIPTION
function quill_fmxml_core() {
# so it is set even if we end prematurely, useful when adding spells
# gets properly overwritten later on
diff --git a/var/lib/quill/modules/libhistory
b/var/lib/quill/modules/libhistory
index 3aaed57..e7728d8 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -2,6 +2,10 @@
## @Synopsis libhistory
#---

+##
+## @Globals HISTORY_DATE GURU_NAME GURU_EMAIL PROVIDESISON DEPENDSISON
+## @Globals CONFIGUREISON PREPAREISON CONFLICTSISON PREBUILDISON BUILDISON
+## @Globals INSTALLISON POSTINSTALLISON TRIGGERSISON FINALISON BUILD_DTFILE
function add_history()
{
message "Generating HISTORY file ..."
@@ -17,6 +21,8 @@ message "Done."
#---
## @Synopsis Adds a new HISTORY entry. Uses idempotent date title handling.
## @param entry without the leading tab, bullet and space
+##
+## @Globals HISTORY_DATE GURU_NAME GURU_EMAIL
#---
function add_history_entry()
{
@@ -42,6 +48,8 @@ function add_history_entry()
#---
## @Synopsis Adds new HISTORY entries.
## @param entry without the leading tab, bullet and space
+##
+## @Globals none
#---
function add_history_entries()
{
@@ -57,6 +65,8 @@ function add_history_entries()

#---
## @Synopsis Adds arbitrary HISTORY entries.
+##
+## @Globals SPELL_UPDATED
#---
function add_user_history_entries()
{
diff --git a/var/lib/quill/modules/libinstall
b/var/lib/quill/modules/libinstall
index 002f748..6880e6e 100644
--- a/var/lib/quill/modules/libinstall
+++ b/var/lib/quill/modules/libinstall
@@ -2,8 +2,8 @@
## @Synopsis libinstall
#---

-INSTALLISON=""
-
+##
+## @Globals EDITOR
function add_install()
{
touch INSTALL
@@ -16,6 +16,8 @@ function add_install()
$EDITOR INSTALL
}

+##
+## @Globals INSTALLISON
function query_spell_install()
{
if query "Will you be adding a custom INSTALL file:" "n"
@@ -24,6 +26,8 @@ then
fi
}

+##
+## @Globals
function implement_install_system()
{
return
diff --git a/var/lib/quill/modules/libperlcpan
b/var/lib/quill/modules/libperlcpan
index cda4dc8..5bfecbe 100644
--- a/var/lib/quill/modules/libperlcpan
+++ b/var/lib/quill/modules/libperlcpan
@@ -1,6 +1,9 @@
#---
## @Synopsis Perl-cpan module to generate spells from perl-cpan metadata
#---
+
+##
+## @Globals QUILL_TMP_DIR
function quill_get_manifests()
{
# unless someone knows a better way to check files creation time
@@ -25,6 +28,8 @@ function quill_get_manifests()
fi
}

+##
+## @Globals QUILL_CPAN_INFO QUILL_CPAN_METADATA
function quill_get_cpan_meta(){
eval QUILL_CPAN_INFO="( $(zgrep -w -E "^${1}"
$QUILL_TMP_DIR/02packages.details.txt.gz | head -n1) )"
# zgrep -w -E "^${1}" $QUILL_TMP_DIR/02packages.details.txt.gz | head -n1
@@ -32,6 +37,10 @@ function quill_get_cpan_meta(){
# zgrep -w -B1 -A9 -E "^'${1}'" $QUILL_TMP_DIR/03modlist.data.gz | tr -d
"[]" | sed 's:,$::g'
}

+##
+## @Globals QUILL_TMP_DIR SPELL_NAME SPELL_SRC_URL SPELL_VERSION
SPELL_LICENSE
+## @Globals SPELL_SHORT_DESCRIPTION SPELL_URL SPELL_DEPENDENCIES BUILDISON
+## @Globals DEPENDSISON QUILL_CPAN_INFO QUILL_CPAN_METADATA
function quill_cpan_core()
{
# so it is set even if we end prematurely, useful when adding spells
diff --git a/var/lib/quill/modules/libpre_build
b/var/lib/quill/modules/libpre_build
index 6deb2f1..52b69fa 100644
--- a/var/lib/quill/modules/libpre_build
+++ b/var/lib/quill/modules/libpre_build
@@ -2,8 +2,8 @@
## @Synopsis libpre_build
#---

-PREBUILDISON=""
-
+##
+## @Globals PREBUILDISON
function query_spell_pre_build()
{
if query "Will you be adding a custom PRE_BUILD file:" "n"
@@ -12,6 +12,8 @@ function query_spell_pre_build()
fi
}

+##
+## @Globals EDITOR
function add_pre_build()
{
touch PRE_BUILD
diff --git a/var/lib/quill/modules/libprepare
b/var/lib/quill/modules/libprepare
index b70901e..b43910c 100644
--- a/var/lib/quill/modules/libprepare
+++ b/var/lib/quill/modules/libprepare
@@ -2,6 +2,8 @@
## @Synopsis libprepare
#---

+##
+## @Globals PREPAREISON
function query_spell_prepare()
{
if query "Will you be adding a PREPARE file:" "n"
@@ -10,6 +12,8 @@ then
fi
}

+##
+## @Globals EDITOR
function add_prepare()
{
touch PREPARE
diff --git a/var/lib/quill/modules/libprovides
b/var/lib/quill/modules/libprovides
index 37f441e..cc1b2ff 100644
--- a/var/lib/quill/modules/libprovides
+++ b/var/lib/quill/modules/libprovides
@@ -3,14 +3,18 @@
## @Note DONE
#---

-PROVIDESISON=""
-
+##
+## @Globals SPELL_PROVIDES
function query_spell_provides() {
query_msg "Please enter provides if any:"
read "SPELL_PROVIDES"
}

+##
+## @Globals PROVIDESISON SPELL_PROVIDES
function add_provides() {
+ local n
+
touch PROVIDES
PROVIDESISON="PROVIDES, "
for n in ${SPELL_PROVIDES}
diff --git a/var/lib/quill/modules/librubyraa
b/var/lib/quill/modules/librubyraa
index 8cae064..cee95ba 100644
--- a/var/lib/quill/modules/librubyraa
+++ b/var/lib/quill/modules/librubyraa
@@ -2,6 +2,8 @@
## Ruby RAA module
#

+##
+## @Globals none
function quill_raa_get_info(){
local info
local raa_project_file
@@ -10,6 +12,9 @@ function quill_raa_get_info(){
grep "${info}:" $raa_project_file | sed -e "s/ *${info}: *\(.*\)/\1/"
}

+##
+## @Globals SPELL_NAME SPELL_SHORT_DESCRIPTION SPELL_LICENSE SPELL_URL
+## @Globals SPELL_SRC_URL SPELL_DEPENDENCIES DEPENDSISON QUILL_TMP_DIR
function quill_raa_core(){
local project
local desc
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index c75f640..aa9fa68 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -1,23 +1,25 @@
#---
## @Synopsis Sets up some global variables that contain sources and urls
## @Synopsis delimited by newlines
-## @Globals if_var
+##
+## @Globals "version_switch"
#---
function get_sources_and_urls()
{
- sources_and_urls=$(eval ${if_var:-:}; . DETAILS &> /dev/null;
get_spell_files_and_urls)
+ sources_and_urls=$(eval ${version_switch:-:}; . DETAILS &> /dev/null;
get_spell_files_and_urls)
sources=$(cut -d" " -f1 <<< "$sources_and_urls")
source_urls=$(cut -d" " -f2 <<< "$sources_and_urls")
}

#---
-## @Synopsis Sets a variable from details, first setting the flag if_var
+## @Synopsis Sets a variable from details, first setting the flag
version_switch
## @param variable to set
-## @Globals if_var
+##
+## @Globals "version_switch"
#---
function conditional_set_var()
{
- eval ${if_var:-:}; . DETAILS &> /dev/null; eval echo -n \$$1
+ eval ${version_switch:-:}; . DETAILS &> /dev/null; eval echo -n \$$1
}

#---
@@ -28,6 +30,7 @@ function conditional_set_var()
## @param (optional) skip the query? skip to skip
## @param (optional) remove, increment, add? remove to remove
## @param (optional) default answer for the query, default is n
+##
## @Globals none
#---
function update_patchlevel()
@@ -121,6 +124,8 @@ function remove_old_sigs()
#---
## @Synopsis Unexpands SOURCE_GPG if necessary to be later able to match it
##
+## @Globals "current_check" "version_switch"
+##
## @return 0 if current_check was found
## @return 1 otherwise
#---
@@ -133,7 +138,7 @@ function unexpand_source_gpg()
return 0
else # looks like it is expanded
current_check=$(
- eval ${if_var:-:}; . DETAILS.orig &> /dev/null;
+ eval ${version_switch:-:}; . DETAILS.orig &> /dev/null;
for j in `get_source_nums s`
do
j="${j%s}"
@@ -161,7 +166,7 @@ function unexpand_source_gpg()

#---
## @Synopsis Checks if the spell is multiversioned and sets the delimiter
-## @Synopsis variable (if_var) if it is
+## @Synopsis variable (version_switch) if it is
##
## @Globals "versions" "version"
#---
@@ -177,7 +182,7 @@ function multiversion_check()
cat DETAILS
suggestions=$(sed -n 's,[{}],,g; s,^.*if.*$\([A-Za-z_]*\).*$,\1,p'
DETAILS)
[[ ! -z $suggestions ]] && query_msg "Perhaps it is one of these:"
$suggestions
- query_string if_var "${QUERY_COLOR}Please enter the appropriate
variable. Example: UGU_DEVEL=y${DEFAULT_COLOR} "
+ query_string version_switch "${QUERY_COLOR}Please enter the appropriate
variable. Example: UGU_DEVEL=y${DEFAULT_COLOR} "
fi
}

@@ -202,7 +207,7 @@ function user_increment_patchlevel() {
## @Globals SPELL_VERSION SPELL_UPDATED GURU_GPGKEY QUILL_SPELL_DIR "version"
#---
function version_bump() {
- local update_counter="${#versions[@]}" if_var
+ local update_counter="${#versions[@]}" version_switch
local to_summon sources_and_urls sources source_urls source
local hash current_check i new_value
if query "Do you want to update $version?" y; then
@@ -246,7 +251,7 @@ function version_bump() {
echo

#update HISTORY - already here, so that the patchlevels come later
- add_history_entries "DETAILS: updated ${if_var:-spell} to $SPELL_VERSION"
+ add_history_entries "DETAILS: updated ${version_switch:-spell} to
$SPELL_VERSION"
echo

# ask for SECURITY_PATCHing
@@ -263,7 +268,7 @@ function version_bump() {
for source in $sources; do
hash=$(quill_hash_get $SOURCE_CACHE/$source)
# use the original DETAILS, as we already changed the VERSION
- current_check=$(eval ${if_var:-:}; . DETAILS.orig &> /dev/null; eval
echo \$SOURCE${i}_HASH\$SOURCE${i}_GPG\$SOURCE${i}_IGNORE\$\{MD5[${i:-0}]\})
+ current_check=$(eval ${version_switch:-:}; . DETAILS.orig &>
/dev/null; eval echo
\$SOURCE${i}_HASH\$SOURCE${i}_GPG\$SOURCE${i}_IGNORE\$\{MD5[${i:-0}]\})

if [[ -z $current_check ]]; then
error_msg "Missing SOURCE${i}_HASH/SOURCE${i}_GPG/SOURCE${i}_IGNORE"
diff --git a/var/lib/quill/version b/var/lib/quill/version
index c24c7dd..dbd37cc 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2.4-rc11
+0.2.4-rc12



  • [SM-Commit] GIT changes to master quill by Jaka Kranjc (45c517f325dbb541bfdcac8a58aec13b6d8f4d43), Jaka Kranjc, 04/09/2007

Archive powered by MHonArc 2.6.24.

Top of Page