Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Andraž Levstik (e7b53c441f5096eb1b2881de2a1fa0491fa4ec45)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andraž Levstik <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Andraž Levstik (e7b53c441f5096eb1b2881de2a1fa0491fa4ec45)
  • Date: Sat, 15 Sep 2007 15:00:50 -0500

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

usr/bin/quill | 10 +++---
var/lib/quill/ChangeLog | 33 ++++++++++++++++++++++
var/lib/quill/modules/libbuild | 30 ++++++++++----------
var/lib/quill/modules/libconflicts | 5 +--
var/lib/quill/modules/libcopy | 4 +-
var/lib/quill/modules/libcore | 36
+++++++++++-------------
var/lib/quill/modules/libdepends | 20 ++++++-------
var/lib/quill/modules/libdesktop | 26 ++++++++---------
var/lib/quill/modules/libdetails | 7 ++--
var/lib/quill/modules/libhistory | 32 +++++++++++++--------
var/lib/quill/modules/libinstall | 12 ++++----
var/lib/quill/modules/libpre_build | 12 ++++----
var/lib/quill/modules/libprepare | 8 ++---
var/lib/quill/modules/libprovides | 7 ++--
var/lib/quill/modules/libupdate | 26 ++++++++---------
var/lib/quill/modules/site_handlers/libperlcpan | 7 ++--
var/lib/quill/modules/site_handlers/librubyraa | 3 --
var/lib/quill/version | 2 -
18 files changed, 157 insertions(+), 123 deletions(-)

New commits:
commit e7b53c441f5096eb1b2881de2a1fa0491fa4ec45
Author: Andraž Levstik <ruskie AT mages.ath.cx>
Commit: Andraž Levstik <ruskie AT mages.ath.cx>

changed a ton of stuff to not assume we are in the correct dir and to use
the new file based detection method

diff --git a/usr/bin/quill b/usr/bin/quill
index cd26c07..b76b8f6 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -446,7 +446,7 @@ else

add_details

- if [[ "${PREPAREISON}" == "PREPARE, " ]]
+ if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/PREPARE ]]
then
add_prepare
fi
@@ -456,12 +456,12 @@ else
#- add_configure
#-fi

- if [[ "${PREBUILDISON}" == "PRE_BUILD, " ]]
+ if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD ]]
then
add_pre_build
fi

- if [[ "${BUILDISON}" == "BUILD, " ]]
+ if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ]]
then
if [[ -e $QUILL_TMP_DIR/${SPELL_SRC_FILE:-uag1au234gaugua} ]]
then
@@ -477,7 +477,7 @@ else
fi
fi

- if [[ "${INSTALLISON}" == "INSTALL, " ]]
+ if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL ]]
then
if [[ -z $BS ]]; then
add_install
@@ -500,7 +500,7 @@ else
#- add_triggers
#-fi

- if [[ "${BUILD_DTFILE}" != "" ]]
+ if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/desktop/${SPELL_NAME}.desktop ]]
then
add_desktop_file
fi
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 242f44f..0625aff 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,36 @@
+2007-09-15 Andraž "ruskie" Levstik <ruskie AT mages.ath.cx>
+ * quill: use the new way of checking for file existance
+ * libbuild: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libconflicts: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libcopy: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libcore: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libdepends: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libdesktop: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libdetails: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libhistory: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libinstall: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libpre_build: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libprepare: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libprovides: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * libupdate: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * site_handlers/libperlcpan: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+ * site_handlers/librubyraa: removed unenecassry variables,
+ added touching of file, don't assume we are in the correct dir
+
2007-09-14 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcore: added a sanity check to quill_final_put_in_grimoire
* quill: source the site handlers from their new home
diff --git a/var/lib/quill/modules/libbuild b/var/lib/quill/modules/libbuild
index eb73f1c..9ca469f 100644
--- a/var/lib/quill/modules/libbuild
+++ b/var/lib/quill/modules/libbuild
@@ -3,12 +3,12 @@
#---

##
-## @Globals QUILL_FETCH_MODE BUILDISON
+## @Globals QUILL_FETCH_MODE
function query_spell_build() {
if [[ "$QUILL_FETCH_MODE" != "cpan" ]]; then
if query "Will you be adding a custom BUILD file:" "n"
then
- BUILDISON="BUILD, "
+ touch $QUILL_SPELL_DIR/$SPELL_NAME/BUILD
fi
fi
}
@@ -21,12 +21,12 @@ function add_build() {
else
if query "Do you want the default_build function dumped into the BUILD
file" "n"
then
- dump_default_function build | sed -e 's:\( --[^hb]\): \\\n \1:g' -e
"s:&& make:\&\&\nmake:" >> BUILD
+ dump_default_function build | sed -e 's:\( --[^hb]\): \\\n \1:g' -e
"s:&& make:\&\&\nmake:" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
else
- echo "default_build &&" >> BUILD
+ echo "default_build &&" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
fi
fi
- $EDITOR BUILD
+ $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
}

#---
@@ -100,10 +100,10 @@ function implement_build_system() {
[[ $bs == make,configure ]] && return 0

if grep -q autogen <<< $bs; then
- echo "cd blabla ./autogen.sh &&" >> PRE_BUILD
+ echo "cd blabla ./autogen.sh &&" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
fi
if grep -q configure <<< $bs; then
- cat <<"FEO" >> BUILD
+ cat <<"FEO" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
./configure --prefix=$INSTALL_ROOT/usr \
--sysconfdir=$INSTALL_ROOT/etc \
--localstatedir=$INSTALL_ROOT/var \
@@ -114,14 +114,14 @@ FEO
fi

case $bs in
- rake) echo "rake" >> BUILD ;;
- perl) echo "perl Makefile.pl" >> BUILD ;;
- 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 ;;
- jam) echo "jam" >> BUILD ;;
- make) echo "make" >> BUILD ;;
+ rake) echo "rake" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ;;
+ perl) echo "perl Makefile.pl" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
;;
+ PerL) echo "perl Makefile.PL" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
;;
+ python) echo "python setup.py" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ;;
+ waf) echo "waf_build" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ;;
+ scons) echo 'scons PREFIX=$INSTALL_ROOT/usr' >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ;;
+ jam) echo "jam" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ;;
+ make) echo "make" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ;;
esac

}
diff --git a/var/lib/quill/modules/libconflicts
b/var/lib/quill/modules/libconflicts
index 0de83e3..bdac90b 100644
--- a/var/lib/quill/modules/libconflicts
+++ b/var/lib/quill/modules/libconflicts
@@ -11,10 +11,9 @@ function query_spell_conflicts() {
}

##
-## @Globals CONFLICTSISON SPELL_CONFLICTS
+## @Globals SPELL_CONFLICTS
function add_conflicts() {
- touch CONFLICTS
- CONFLICTSISON="CONFLICTS, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/CONFLICTS
for n in ${SPELL_CONFLICTS}
do
echo "conflicts ${n}" >> CONFLICTS
diff --git a/var/lib/quill/modules/libcopy b/var/lib/quill/modules/libcopy
index 4b96d92..23ef421 100644
--- a/var/lib/quill/modules/libcopy
+++ b/var/lib/quill/modules/libcopy
@@ -106,7 +106,7 @@ function copy_from_git()

# update SPELL_UPDATED
codex_get_spell_paths $(codex_find_spell_by_name $SPELL_NAME)
- diff -q $QUILL_SPELL_DIR/$SPELL_NAME "$GRIMOIRE/$SECTION/$SPELL_NAME" -x
DETAILS.orig > /dev/null || SPELL_UPDATED=y
+ diff -q $QUILL_SPELL_DIR/$SPELL_NAME "$GRIMOIRE/$SECTION/$SPELL_NAME" -x
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig > /dev/null || SPELL_UPDATED=y

unset GRIMOIRE2 SECTION2 GRIMOIRE SECTION GRIMOIRE_NAME SECTION_DIRECTORY
cd "$QUILL_SPELL_DIR/$SPELL_NAME"
@@ -151,7 +151,7 @@ function ask_and_copy_over()
return
fi &&
cd $QUILL_SPELL_DIR/$SPELL_NAME &&
- cp DETAILS DETAILS.orig || return 1
+ cp ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig || return 1
}

#---
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index e831414..dae42c3 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -18,15 +18,13 @@ function query_list()
#---
## @Synopsis generate basic spell dir
##
-## @Globals QUILL_SPELL_DIR SPELL_NAME DEPENDSISON CONFLICTSON
+## @Globals QUILL_SPELL_DIR SPELL_NAME
#---
function create_spell_base(){
mkdir -p ${QUILL_SPELL_DIR}/${SPELL_NAME}
cd ${QUILL_SPELL_DIR}/${SPELL_NAME}
- touch DETAILS
- chmod +x DETAILS
- DEPENDSISON=""
- CONFLICTSON=""
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ chmod +x ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
}

#---
@@ -297,9 +295,9 @@ function check_source_urls() {
fi

# some urls may contain other expanded vars that we are not
aware of
- if grep -q "$oldest_su" DETAILS
+ if grep -q "$oldest_su" ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
then # all is fine
- sed -i "s,$oldest_su,$su," DETAILS
+ sed -i "s,$oldest_su,$su,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
else
error_msg "Couldn't find $oldest_su in DETAILS,"
error_msg "probably due to it containing nonstandard variables"
@@ -308,13 +306,13 @@ function check_source_urls() {
add_history_entry "DETAILS: Changed SOURCE${i}_URL[$mirror_num]
extension"
else
substitute_with_variables source "$SPELL_NAME" {SPELL}
"$SPELL_VERSION" {VERSION}
- sed -i "s,$old_source,$source," DETAILS
+ sed -i "s,$old_source,$source,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
# we don't know if the SOURCE is expanded or not, trying just
both extremes
substitute_with_variables old_source "$SPELL_NAME" {SPELL}
"$SPELL_VERSION" {VERSION}
- sed -i "s,$old_source,$source," DETAILS
+ sed -i "s,$old_source,$source,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
# and with the beautiful syntax last
old_source="$(tr -d "{}" <<< "$old_source")"
- sed -i "s,$old_source,$source," DETAILS
+ sed -i "s,$old_source,$source,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
add_history_entry "DETAILS: Changed SOURCE${i} extension"
fi
rc=0
@@ -322,7 +320,7 @@ function check_source_urls() {
# if they are still not ok ask for fixed ones
error_msg "SOURCE${i}_URL[$mirror_num] is hopelessly broken! Fix
it manually."
sleep 2
- quill_edit DETAILS
+ quill_edit ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
add_history_entry "DETAILS: Fixed SOURCE${i}_URL[$mirror_num]"
rc=1
fi
@@ -467,17 +465,17 @@ function check_executable_bits(){
#---
function check_description_wrap(){

- sed -n '/cat *<< *EOF/,/EOF/p' DETAILS > long.description
+ sed -n '/cat *<< *EOF/,/EOF/p' ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS >
long.description
awk '{ if(length($0)>a) a=length($0)} \
END{if(a>80)exit 1; else exit 0}' \
long.description && rm long.description && return 0

- sed -i '/cat *<< *EOF/,/EOF/d' DETAILS
- sed '1d; $d' long.description | fmt -w 80 > long.description.2
+ sed -i '/cat *<< *EOF/,/EOF/d' ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed '1d; $d' long.description | fmt -u -w 80 > long.description.2
mv long.description.2 long.description
- echo 'cat << EOF' >> DETAILS
- cat long.description >> DETAILS
- echo 'EOF' >> DETAILS
+ echo 'cat << EOF' >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ cat long.description >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ echo 'EOF' >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
add_history_entry "DETAILS: fixed long description wrap"
rm long.description

@@ -506,7 +504,7 @@ function summon_sources() {
else
if ! summon -r <<< "$to_summon"; then
error_msg "Summoning failed, aborting update!"
- query "Do you want to edit DETAILS? (you can retry the update)" n &&
quill_edit DETAILS
+ query "Do you want to edit DETAILS? (you can retry the update)" n &&
quill_edit ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
continue 2 || return 1
fi
fi
@@ -524,7 +522,7 @@ function inc_to_unique_src_num() {
local name="$1" num

num=$(
- eval ${version_switch:-:}; . DETAILS &> /dev/null
+ eval ${version_switch:-:}; . ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS &>
/dev/null
# the numbers are alphabetically sorted, which is not good enough in the
# rare case where there are more than 9 sources - so we resort to
resorting
get_source_nums | sort -n | tail -n1
diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index 666c0ed..6b0233b 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -23,20 +23,19 @@ function query_spell_optional_dependencies() {
}

##
-## @Globals DEPENDSISON SPELL_DEPENDENCIES
+## @Globals SPELL_DEPENDENCIES
function add_dependencies() {
local i

- touch DEPENDS
- DEPENDSISON="DEPENDS, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
for i in ${SPELL_DEPENDENCIES}
do
- echo "depends ${i}" >> DEPENDS
+ echo "depends ${i}" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
done
}

##
-## @Globals DEPENDSISON SPELL_OPTIONAL_DEPENDENCIES
+## @Globals SPELL_OPTIONAL_DEPENDENCIES
function add_optional_dependencies() {
local dep dep_count
local SPELL_OPTIONAL_DEPENDENCIES_ENABLED[0]=""
@@ -44,8 +43,7 @@ function add_optional_dependencies() {
local SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[0]=""

dep_count=${#SPELL_OPTIONAL_DEPENDENCIES[*]}
- touch DEPENDS
- DEPENDSISON="DEPENDS, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
for ((dep=0; dep < $dep_count; dep++))
do
query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a ./configure
enable option"
@@ -55,10 +53,10 @@ function add_optional_dependencies() {
query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a description"
read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$dep]

- 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
+ message "optional_depends ${SPELL_OPTIONAL_DEPENDENCIES[$dep]} \\" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
+ message "
\"${SPELL_OPTIONAL_DEPENDENCIES_ENABLED[$dep]}\" \\" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
+ message "
\"${SPELL_OPTIONAL_DEPENDENCIES_DISABLED[$dep]}\" \\" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
+ message "
\"${SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$dep]}\"" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
done
# "optional_depends ${j} \"enabled-option\" \"disabled-option\"
\"description\""
}
diff --git a/var/lib/quill/modules/libdesktop
b/var/lib/quill/modules/libdesktop
index 504cfbf..6d545f6 100644
--- a/var/lib/quill/modules/libdesktop
+++ b/var/lib/quill/modules/libdesktop
@@ -8,7 +8,7 @@
query_spell_desktop_file() {
if query "Will you be adding a custom desktop file?" "n"
then
- BUILD_DTFILE="desktop/${SPELL_NAME}.desktop, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/desktop/${SPELL_NAME}.desktop
DTFILE_MENUENTRY="${SPELL_NAME}"

query_msg "Please enter the name of the executable:"
@@ -29,18 +29,18 @@ 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
- echo "[Desktop Entry]" >> ${SPELL_NAME}.desktop
- echo "Encoding=UTF-8" >> ${SPELL_NAME}.desktop
- echo "Version=1.0" >> ${SPELL_NAME}.desktop
- echo "Name=${DTFILE_MENUENTRY}" >> ${SPELL_NAME}.desktop
- echo "Type=Application" >> ${SPELL_NAME}.desktop
- echo "Comment=${SPELL_SHORT_DESCRIPTION}" >> ${SPELL_NAME}.desktop
- echo "Exec=${DTFILE_EXEC}" >> ${SPELL_NAME}.desktop
- echo "Icon=${DTFILE_ICON}" >> ${SPELL_NAME}.desktop
- echo "Categories=${DTFILE_MENUPATH}" >> ${SPELL_NAME}.desktop
- echo "Term=${DTFILE_TERM}" >> ${SPELL_NAME}.desktop
+ mkdir -p ${QUILL_SPELL_DIR}/${SPELL_NAME}/desktop
+ cd ${QUILL_SPELL_DIR}/${SPELL_NAME}/desktop
+ echo "[Desktop Entry]" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Encoding=UTF-8" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Version=1.0" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Name=${DTFILE_MENUENTRY}" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Type=Application" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Comment=${SPELL_SHORT_DESCRIPTION}" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Exec=${DTFILE_EXEC}" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Icon=${DTFILE_ICON}" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Categories=${DTFILE_MENUPATH}" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
+ echo "Term=${DTFILE_TERM}" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/${SPELL_NAME}.desktop
cd ..
}
#---
diff --git a/var/lib/quill/modules/libdetails
b/var/lib/quill/modules/libdetails
index 897da4b..2f65816 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -201,7 +201,8 @@ function hunt_src_dir(){
{ error_msg "Error: getting path from
zipfile" && return 1; }
if [[ $SPELL_SRC_DIR == "" ]] ; then

SPELL_SRC_DIR=${SPELL_NAME}-${SPELL_VERSION}
- PREBUILDISON="PRE_BUILD, "
+ touch
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
+
rm -f
${QUILL_TMP_DIR}/${SPELL_NAME}-PRE_BUILD
touch
${QUILL_TMP_DIR}/${SPELL_NAME}-PRE_BUILD
echo "mk_source_dir \$SOURCE_DIRECTORY
&&" >> ${QUILL_TMP_DIR}/${SPELL_NAME}-PRE_BUILD
@@ -250,10 +251,10 @@ SOURCE_DIRECTORY=\"\${BUILD_DIRECTORY}/$spell_src_dir\"
SHORT=\"${SPELL_SHORT_DESCRIPTION}\"
cat << EOF
$(fmt -u -w80 ${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-$SPELL_NAME})
-EOF" > DETAILS
+EOF" > ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
rm ${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-$SPELL_NAME}

- clear_html_specials DETAILS
+ clear_html_specials ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS

message "Done.\n"
}
diff --git a/var/lib/quill/modules/libhistory
b/var/lib/quill/modules/libhistory
index 6147992..204a6c0 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -12,8 +12,9 @@ function add_history()
message "Generating HISTORY file ..."

files=$(echo * | sed -e 's, \S*\.sign* , ,g; s, \S*\.asc , ,g' -e 's/ /,
/g')
- echo > HISTORY
- sed -i "1 s%^.*$%$title\n\t* ${files/HISTORY/}, HISTORY: $1\n%" HISTORY
+ echo > ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
+ sed -i "1 s%^.*$%$title\n\t* ${files/HISTORY/}, HISTORY: $1\n%" \
+ ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY

message "Done."

@@ -29,31 +30,38 @@ function add_history_entry()
{
local title="$HISTORY_DATE $GURU_NAME <$GURU_EMAIL>" file

- if [[ ! -e HISTORY ]]; then
+ if [[ ! -e ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY ]]; then
error_msg "Spell is missing a HISTORY file!"
- [[ -e DETAILS.orig ]] && mv DETAILS.orig ..
+ [[ -e ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig ]] &&
+ mv ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig \
+ ${QUILL_TMP_DIR}/${SPELL_NAME}-DETAILS.orig
add_history "added missing HISTORY file"
- [[ -e ../DETAILS.orig ]] && mv ../DETAILS.orig .
+ [[ -e ${QUILL_TMP_DIR}/${SPELL_NAME}-DETAILS.orig ]] &&
+ mv ${QUILL_TMP_DIR}/${SPELL_NAME}-DETAILS.orig \
+ ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig
fi

- if grep -q "$title" HISTORY;
+ if grep -q "$title" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY;
then
# check if we already have an entry for the same file
file="${1%%:*}"
- if [[ -z $(sed -n "1,/^\s*$/ s%\* $file:%&%p" HISTORY) ]]
+ if [[ -z $(sed -n "1,/^\s*$/ s%\* $file:%&%p" \
+ ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY) ]]
then # we don't
- sed -i "/$title/ a\\\t* $1" HISTORY
+ sed -i "/$title/ a\\\t* $1" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
else
# we do, but first check that the new addition is unique
- if ! sed -n "1,/^\s*$/p" HISTORY | grep -qF "* $1"
+ if ! sed -n "1,/^\s*$/p" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY | \
+ grep -qF "* $1"
then
sed -i "1,/^\s*$/ {
/\* $file:/ a\\\t ${1#*:}
- }" HISTORY
+ }" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
fi
fi
else # first time today
- sed -i "1 s%^.*$%$title\n\t* $1\n\n&%" HISTORY
+ sed -i "1 s%^.*$%$title\n\t* $1\n\n&%" \
+ ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
fi
}

@@ -96,7 +104,7 @@ function add_user_history_entries()
echo
if [[ $modified == "1" ]]; then
query "Do you want to review the HISTORY changes?" n &&
- quill_edit HISTORY
+ quill_edit ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
echo
SPELL_UPDATED=y
fi
diff --git a/var/lib/quill/modules/libinstall
b/var/lib/quill/modules/libinstall
index 6880e6e..4eea173 100644
--- a/var/lib/quill/modules/libinstall
+++ b/var/lib/quill/modules/libinstall
@@ -6,23 +6,23 @@
## @Globals EDITOR
function add_install()
{
- touch INSTALL
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
if query "Do you want the default_install function dumped into the INSTALL
file" "n"
then
- dump_default_function install > INSTALL
+ dump_default_function install > ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
else
- echo "default_install &&" > INSTALL
+ echo "default_install &&" > ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
fi
- $EDITOR INSTALL
+ $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
}

##
-## @Globals INSTALLISON
+## @Globals
function query_spell_install()
{
if query "Will you be adding a custom INSTALL file:" "n"
then
- INSTALLISON="INSTALL, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
fi
}

diff --git a/var/lib/quill/modules/libpre_build
b/var/lib/quill/modules/libpre_build
index 3ac97be..876fb08 100644
--- a/var/lib/quill/modules/libpre_build
+++ b/var/lib/quill/modules/libpre_build
@@ -3,12 +3,12 @@
#---

##
-## @Globals PREBUILDISON
+## @Globals
function query_spell_pre_build()
{
if query "Will you be adding a custom PRE_BUILD file:" "n"
then
- PREBUILDISON="PRE_BUILD, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
fi
}

@@ -20,15 +20,15 @@ function add_pre_build()
cp ${QUILL_TMP_DIR}/${SPELL_NAME}-PRE_BUILD \
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
else
- touch PRE_BUILD
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
if query "Do you want the default_pre_build function dumped into the
PRE_BUILD file" "n"
then
- dump_default_function pre_build | sed "s:&&:\&\&\n:g" > PRE_BUILD
+ dump_default_function pre_build | sed "s:&&:\&\&\n:g" >
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
else
- echo "default_pre_build &&" > PRE_BUILD
+ echo "default_pre_build &&" >
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
fi
fi
- $EDITOR PRE_BUILD
+ $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
}
#---
##
diff --git a/var/lib/quill/modules/libprepare
b/var/lib/quill/modules/libprepare
index b43910c..4fb15b6 100644
--- a/var/lib/quill/modules/libprepare
+++ b/var/lib/quill/modules/libprepare
@@ -3,12 +3,12 @@
#---

##
-## @Globals PREPAREISON
+## @Globals
function query_spell_prepare()
{
if query "Will you be adding a PREPARE file:" "n"
then
- PREPAREISON="PREPARE, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PREPARE
fi
}

@@ -16,8 +16,8 @@ fi
## @Globals EDITOR
function add_prepare()
{
- touch PREPARE
- $EDITOR PREPARE
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PREPARE
+ $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/PREPARE
}
#---
##
diff --git a/var/lib/quill/modules/libprovides
b/var/lib/quill/modules/libprovides
index cc1b2ff..01b8356 100644
--- a/var/lib/quill/modules/libprovides
+++ b/var/lib/quill/modules/libprovides
@@ -11,15 +11,14 @@ function query_spell_provides() {
}

##
-## @Globals PROVIDESISON SPELL_PROVIDES
+## @Globals SPELL_PROVIDES
function add_provides() {
local n

- touch PROVIDES
- PROVIDESISON="PROVIDES, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PROVIDES
for n in ${SPELL_PROVIDES}
do
- echo "${n}" | tr "a-z" "A-Z" >> PROVIDES
+ echo "${n}" | tr "a-z" "A-Z" >>
${QUILL_SPELL_DIR}/${SPELL_NAME}/PROVIDES
done
}
#---
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index e368a32..4f5c31a 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -6,7 +6,7 @@
#---
function get_sources_and_urls()
{
- sources_and_urls=$(eval ${version_switch:-:}; . DETAILS &> /dev/null;
get_spell_files_and_urls)
+ sources_and_urls=$(eval ${version_switch:-:}; .
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS &> /dev/null;
get_spell_files_and_urls)
sources=$(cut -d" " -f1 <<< "$sources_and_urls")
source_urls=()
explode "$(cut -d" " -f2- <<< "$sources_and_urls")" $'\n' source_urls
@@ -20,7 +20,7 @@ function get_sources_and_urls()
#---
function conditional_get_var()
{
- ( eval ${version_switch:-:}; . DETAILS &> /dev/null; eval echo -n \$$1 )
+ ( eval ${version_switch:-:}; . ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS &>
/dev/null; eval echo -n \$$1 )
}

#---
@@ -65,7 +65,7 @@ function update_patchlevel_sub()
add_history_entry "DETAILS: $1++"
else
new_value=$(( current_value + 1 ))
- count=$(grep -c "^[^#]*$1=['\"]*${current_value}['\"]* *$" DETAILS)
+ count=$(grep -c "^[^#]*$1=['\"]*${current_value}['\"]* *$"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS)
if (( $count > 1 ))
then
echo
@@ -75,9 +75,9 @@ function update_patchlevel_sub()
fi
if [[ $action == remove ]]
then #PATCHLEVEL removal on version updates
- sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/d" DETAILS
+ sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/d"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
else
- sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/ s,=.*$,=$new_value,"
DETAILS
+ sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/ s,=.*$,=$new_value,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
add_history_entry "DETAILS: $1++"
fi
fi
@@ -93,7 +93,7 @@ function update_patchlevel_sub()
function count_spaces()
{
local count spaces eq_col
- eq_col=$(awk -F '=' '{ if($1)print length($1) }' DETAILS | sort | uniq -c
| sort -n | sed -n '$ s,^\s*\S*\s,,p')
+ eq_col=$(awk -F '=' '{ if($1)print length($1) }'
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS | sort | uniq -c | sort -n | sed -n
'$ s,^\s*\S*\s,,p')
count=$(( $eq_col - ${#1} ))
for (( i=0 ; i<$count; i++ )) ; do
spaces="$spaces "
@@ -116,8 +116,8 @@ function multiversion_check()
message "and then you will tell me which variable I need to set, so I
can get "
message "to the correct version ($version)."
sleep 3
- cat DETAILS
- suggestions=$(sed -n 's,[{}],,g; s,^.*if.*$\([A-Za-z_]*\).*$,\1,p'
DETAILS)
+ cat ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ suggestions=$(sed -n 's,[{}],,g; s,^.*if.*$\([A-Za-z_]*\).*$,\1,p'
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS)
[[ ! -z $suggestions ]] && query_msg "Perhaps it is one of these:"
$suggestions
query_string version_switch "${QUERY_COLOR}Please enter the appropriate
variable. Example: UGU_DEVEL=y${DEFAULT_COLOR} "
fi
@@ -153,7 +153,7 @@ function version_bump() {
[[ -z $SPELL_VERSION ]] && error_msg "Empty VERSION!" && continue 2

#save the chosen version
- sed -i "s/\sVERSION=['\"]*${version}['\"]*\s*$/ VERSION=$SPELL_VERSION/"
DETAILS
+ sed -i "s/\sVERSION=['\"]*${version}['\"]*\s*$/ VERSION=$SPELL_VERSION/"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
SPELL_UPDATED=y

#check for multiversion spells
@@ -182,7 +182,7 @@ function version_bump() {
update_patchlevel PATCHLEVEL skip remove

# remove UPDATED if any
- sed -i "/^\s*UPDATED=/d" DETAILS
+ sed -i "/^\s*UPDATED=/d" ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS

#get hashes and save them, removing any previous hash/gpg
i=
@@ -207,7 +207,7 @@ function version_bump() {
# MD5? These contain no :
if ! grep -q ":" <<< "$current_check"; then
new_value=$(count_spaces SOURCE${i}_HASH)
- sed -i
"s/^.*MD5\[${i:-0}\]=['\"]*${current_check}['\"]*\s*$/${new_value}SOURCE${i}_HASH=sha512:$hash/"
DETAILS
+ sed -i
"s/^.*MD5\[${i:-0}\]=['\"]*${current_check}['\"]*\s*$/${new_value}SOURCE${i}_HASH=sha512:$hash/"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
remove_old_sigs "$version"
upstream_gpg_ad

@@ -253,7 +253,7 @@ function version_bump() {

#it is either a SOURCE_HASH or the user wants to replace SOURCE_GPG
new_value=$(count_spaces SOURCE${i}_HASH)
- sed -i
"s/^.*SOURCE${i}_[^=]*=['\"]*${current_check}.*['\"]*\s*$/${new_value}SOURCE${i}_HASH=sha512:$hash/"
DETAILS
+ sed -i
"s/^.*SOURCE${i}_[^=]*=['\"]*${current_check}.*['\"]*\s*$/${new_value}SOURCE${i}_HASH=sha512:$hash/"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS

# remove sigs, trying not to touch any that are still needed
remove_old_sigs "$version"
@@ -280,7 +280,7 @@ function main_update_loop() {
local version versions=()

#fetch current versions, ignoring SCM ones
- versions=( $(sed -n 's/\s*\<VERSION=//p' DETAILS |
+ versions=( $(sed -n 's/\s*\<VERSION=//p'
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS |
grep -Eiv '\$[(]date *+|cvs|svn|tla|git|scm' | sort | uniq) )
[[ -z ${versions[@]} ]] && error_msg "No versions to update!" && continue

diff --git a/var/lib/quill/modules/site_handlers/libperlcpan
b/var/lib/quill/modules/site_handlers/libperlcpan
index d473c03..fb4f057 100644
--- a/var/lib/quill/modules/site_handlers/libperlcpan
+++ b/var/lib/quill/modules/site_handlers/libperlcpan
@@ -42,8 +42,8 @@ function quill_get_cpan_meta(){

##
## @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
+## @Globals SPELL_SHORT_DESCRIPTION SPELL_URL SPELL_DEPENDENCIES
+## @Globals QUILL_CPAN_INFO QUILL_CPAN_METADATA
function quill_cpan_core()
{
# so it is set even if we end prematurely, useful when adding spells
@@ -65,10 +65,9 @@ function quill_cpan_core()
description="${QUILL_CPAN_METADATA[6]}"
SPELL_NAME="${1//::/-}" # the lower case target wasn't manipulated yet
echo $description > ${QUILL_TMP_DIR}/${SPELL_NAME}
- BUILDISON="BUILD, "
+ touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
touch ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
echo "default_build_perl" > ${QUILL_TMP_DIR}/${SPELL_NAME}-BUILD
- DEPENDSISON="DEPENDS, "
SPELL_DEPENDENCIES="perl"
else
error_msg "Error: unable to find such a CPAN module"
diff --git a/var/lib/quill/modules/site_handlers/librubyraa
b/var/lib/quill/modules/site_handlers/librubyraa
index f76ee82..1bab880 100644
--- a/var/lib/quill/modules/site_handlers/librubyraa
+++ b/var/lib/quill/modules/site_handlers/librubyraa
@@ -14,7 +14,7 @@ function quill_raa_get_info(){

##
## @Globals SPELL_NAME SPELL_SHORT_DESCRIPTION SPELL_LICENSE SPELL_URL
-## @Globals SPELL_SRC_URL SPELL_DEPENDENCIES DEPENDSISON QUILL_TMP_DIR
+## @Globals SPELL_SRC_URL SPELL_DEPENDENCIES QUILL_TMP_DIR
function quill_raa_core(){
local project
local desc
@@ -53,7 +53,6 @@ function quill_raa_core(){
-e '1s/.*Description: *\(.*\)/\1/' \
-e "/.*Edit this project.*/d" \
${QUILL_TMP_DIR}/${SPELL_NAME}
- DEPENDSISON="DEPENDS, "
SPELL_DEPENDENCIES="ruby"

}
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 7d463b5..d26a8e4 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2.9-rc2
+0.2.9-rc3



  • [SM-Commit] GIT changes to master quill by Andraž Levstik (e7b53c441f5096eb1b2881de2a1fa0491fa4ec45), Andraž Levstik, 09/15/2007

Archive powered by MHonArc 2.6.24.

Top of Page