New commits:
commit 500de96b74f9a55f80d66b563c29f47a770d1b12
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Revert "changed a ton of stuff to not assume we are in the correct dir
and to use the new file based detection method"
This reverts commit e7b53c441f5096eb1b2881de2a1fa0491fa4ec45.
for a cleanup it adds too much crap. We can simply make sure we are in
the correct dir (we are now).
- if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/PREPARE ]]
+ if [[ "${PREPAREISON}" == "PREPARE, " ]]
then
add_prepare
fi
@@ -456,12 +456,12 @@ else
#- add_configure
#-fi
- if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD ]]
+ if [[ "${PREBUILDISON}" == "PRE_BUILD, " ]]
then
add_pre_build
fi
- if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD ]]
+ if [[ "${BUILDISON}" == "BUILD, " ]]
then
if [[ -e $QUILL_TMP_DIR/${SPELL_SRC_FILE:-uag1au234gaugua} ]]
then
@@ -477,7 +477,7 @@ else
fi
fi
- if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL ]]
+ if [[ "${INSTALLISON}" == "INSTALL, " ]]
then
if [[ -z $BS ]]; then
add_install
@@ -500,7 +500,7 @@ else
#- add_triggers
#-fi
- if [[ -f ${QUILL_SPELL_DIR}/${SPELL_NAME}/desktop/${SPELL_NAME}.desktop ]]
+ if [[ "${BUILD_DTFILE}" != "" ]]
then
add_desktop_file
fi
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 0625aff..242f44f 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,36 +1,3 @@
-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 9ca469f..eb73f1c 100644
--- a/var/lib/quill/modules/libbuild
+++ b/var/lib/quill/modules/libbuild
@@ -3,12 +3,12 @@
#---
##
-## @Globals QUILL_FETCH_MODE
+## @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"
then
- touch $QUILL_SPELL_DIR/$SPELL_NAME/BUILD
+ BUILDISON="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:" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
+ dump_default_function build | sed -e 's:\( --[^hb]\): \\\n \1:g' -e
"s:&& make:\&\&\nmake:" >> BUILD
else
- echo "default_build &&" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
+ echo "default_build &&" >> BUILD
fi
fi
- $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/BUILD
+ $EDITOR BUILD
}
#---
@@ -295,9 +297,9 @@ function check_source_urls() {
fi
# some urls may contain other expanded vars that we are not
aware of
- if grep -q "$oldest_su" ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ if grep -q "$oldest_su" DETAILS
then # all is fine
- sed -i "s,$oldest_su,$su,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "s,$oldest_su,$su," DETAILS
else
error_msg "Couldn't find $oldest_su in DETAILS,"
error_msg "probably due to it containing nonstandard variables"
@@ -306,13 +308,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,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "s,$old_source,$source," 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,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "s,$old_source,$source," DETAILS
# and with the beautiful syntax last
old_source="$(tr -d "{}" <<< "$old_source")"
- sed -i "s,$old_source,$source,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "s,$old_source,$source," DETAILS
add_history_entry "DETAILS: Changed SOURCE${i} extension"
fi
rc=0
@@ -320,7 +322,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 ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ quill_edit DETAILS
add_history_entry "DETAILS: Fixed SOURCE${i}_URL[$mirror_num]"
rc=1
fi
@@ -465,17 +467,17 @@ function check_executable_bits(){
#---
function check_description_wrap(){
@@ -504,7 +506,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 ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ query "Do you want to edit DETAILS? (you can retry the update)" n &&
quill_edit DETAILS
continue 2 || return 1
fi
fi
@@ -522,7 +524,7 @@ function inc_to_unique_src_num() {
local name="$1" num
num=$(
- eval ${version_switch:-:}; . ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS &>
/dev/null
+ eval ${version_switch:-:}; . 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 6b0233b..666c0ed 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -23,19 +23,20 @@ function query_spell_optional_dependencies() {
}
##
-## @Globals SPELL_DEPENDENCIES
+## @Globals DEPENDSISON SPELL_DEPENDENCIES
function add_dependencies() {
local i
- touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
+ touch DEPENDS
+ DEPENDSISON="DEPENDS, "
for i in ${SPELL_DEPENDENCIES}
do
- echo "depends ${i}" >> ${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
+ echo "depends ${i}" >> DEPENDS
done
}
##
-## @Globals SPELL_OPTIONAL_DEPENDENCIES
+## @Globals DEPENDSISON SPELL_OPTIONAL_DEPENDENCIES
function add_optional_dependencies() {
local dep dep_count
local SPELL_OPTIONAL_DEPENDENCIES_ENABLED[0]=""
@@ -43,7 +44,8 @@ function add_optional_dependencies() {
local SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[0]=""
dep_count=${#SPELL_OPTIONAL_DEPENDENCIES[*]}
- touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/DEPENDS
+ touch DEPENDS
+ DEPENDSISON="DEPENDS, "
for ((dep=0; dep < $dep_count; dep++))
do
query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a ./configure
enable option"
@@ -53,10 +55,10 @@ function add_optional_dependencies() {
query_msg "${SPELL_OPTIONAL_DEPENDENCIES[$dep]} needs a description"
read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$dep]
message "Done.\n"
}
diff --git a/var/lib/quill/modules/libhistory
b/var/lib/quill/modules/libhistory
index 204a6c0..6147992 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -12,9 +12,8 @@ function add_history()
message "Generating HISTORY file ..."
files=$(echo * | sed -e 's, \S*\.sign* , ,g; s, \S*\.asc , ,g' -e 's/ /,
/g')
- 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
+ echo > HISTORY
+ sed -i "1 s%^.*$%$title\n\t* ${files/HISTORY/}, HISTORY: $1\n%" HISTORY
message "Done."
@@ -30,38 +29,31 @@ function add_history_entry()
{
local title="$HISTORY_DATE $GURU_NAME <$GURU_EMAIL>" file
- if [[ ! -e ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY ]]; then
+ if [[ ! -e HISTORY ]]; then
error_msg "Spell is missing a HISTORY file!"
- [[ -e ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig ]] &&
- mv ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig \
- ${QUILL_TMP_DIR}/${SPELL_NAME}-DETAILS.orig
+ [[ -e DETAILS.orig ]] && mv DETAILS.orig ..
add_history "added missing HISTORY file"
- [[ -e ${QUILL_TMP_DIR}/${SPELL_NAME}-DETAILS.orig ]] &&
- mv ${QUILL_TMP_DIR}/${SPELL_NAME}-DETAILS.orig \
- ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS.orig
+ [[ -e ../DETAILS.orig ]] && mv ../DETAILS.orig .
fi
- if grep -q "$title" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY;
+ if grep -q "$title" HISTORY;
then
# check if we already have an entry for the same file
file="${1%%:*}"
- if [[ -z $(sed -n "1,/^\s*$/ s%\* $file:%&%p" \
- ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY) ]]
+ if [[ -z $(sed -n "1,/^\s*$/ s%\* $file:%&%p" HISTORY) ]]
then # we don't
- sed -i "/$title/ a\\\t* $1" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
+ sed -i "/$title/ a\\\t* $1" HISTORY
else
# we do, but first check that the new addition is unique
- if ! sed -n "1,/^\s*$/p" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY | \
- grep -qF "* $1"
+ if ! sed -n "1,/^\s*$/p" HISTORY | grep -qF "* $1"
then
sed -i "1,/^\s*$/ {
/\* $file:/ a\\\t ${1#*:}
- }" ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
+ }" HISTORY
fi
fi
else # first time today
- sed -i "1 s%^.*$%$title\n\t* $1\n\n&%" \
- ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
+ sed -i "1 s%^.*$%$title\n\t* $1\n\n&%" HISTORY
fi
}
@@ -104,7 +96,7 @@ function add_user_history_entries()
echo
if [[ $modified == "1" ]]; then
query "Do you want to review the HISTORY changes?" n &&
- quill_edit ${QUILL_SPELL_DIR}/${SPELL_NAME}/HISTORY
+ quill_edit HISTORY
echo
SPELL_UPDATED=y
fi
diff --git a/var/lib/quill/modules/libinstall
b/var/lib/quill/modules/libinstall
index 4eea173..6880e6e 100644
--- a/var/lib/quill/modules/libinstall
+++ b/var/lib/quill/modules/libinstall
@@ -6,23 +6,23 @@
## @Globals EDITOR
function add_install()
{
- touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
+ touch INSTALL
if query "Do you want the default_install function dumped into the INSTALL
file" "n"
then
- dump_default_function install > ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
+ dump_default_function install > INSTALL
else
- echo "default_install &&" > ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
+ echo "default_install &&" > INSTALL
fi
- $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
+ $EDITOR INSTALL
}
##
-## @Globals
+## @Globals INSTALLISON
function query_spell_install()
{
if query "Will you be adding a custom INSTALL file:" "n"
then
- touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/INSTALL
+ INSTALLISON="INSTALL, "
fi
}
##
-## @Globals
+## @Globals PREBUILDISON
function query_spell_pre_build()
{
if query "Will you be adding a custom PRE_BUILD file:" "n"
then
- touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
+ PREBUILDISON="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 ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
+ touch 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" >
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
+ dump_default_function pre_build | sed "s:&&:\&\&\n:g" > PRE_BUILD
else
- echo "default_pre_build &&" >
${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
+ echo "default_pre_build &&" > PRE_BUILD
fi
fi
- $EDITOR ${QUILL_SPELL_DIR}/${SPELL_NAME}/PRE_BUILD
+ $EDITOR PRE_BUILD
}
#---
##
diff --git a/var/lib/quill/modules/libprepare
b/var/lib/quill/modules/libprepare
index 4fb15b6..b43910c 100644
--- a/var/lib/quill/modules/libprepare
+++ b/var/lib/quill/modules/libprepare
@@ -3,12 +3,12 @@
#---
##
-## @Globals
+## @Globals PREPAREISON
function query_spell_prepare()
{
if query "Will you be adding a PREPARE file:" "n"
then
- touch ${QUILL_SPELL_DIR}/${SPELL_NAME}/PREPARE
+ PREPAREISON="PREPARE, "
fi
}
#---
@@ -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}['\"]* *$"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS)
+ count=$(grep -c "^[^#]*$1=['\"]*${current_value}['\"]* *$" 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"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/d" DETAILS
else
- sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/ s,=.*$,=$new_value,"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "/^[^#]*$1=['\"]*${current_value}['\"]*/ s,=.*$,=$new_value,"
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) }'
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS | sort | uniq -c | sort -n | sed -n
'$ s,^\s*\S*\s,,p')
+ eq_col=$(awk -F '=' '{ if($1)print length($1) }' 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 ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
- suggestions=$(sed -n 's,[{}],,g; s,^.*if.*$\([A-Za-z_]*\).*$,\1,p'
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS)
+ 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 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/"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "s/\sVERSION=['\"]*${version}['\"]*\s*$/ VERSION=$SPELL_VERSION/"
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" ${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i "/^\s*UPDATED=/d" 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/"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i
"s/^.*MD5\[${i:-0}\]=['\"]*${current_check}['\"]*\s*$/${new_value}SOURCE${i}_HASH=sha512:$hash/"
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/"
${QUILL_SPELL_DIR}/${SPELL_NAME}/DETAILS
+ sed -i
"s/^.*SOURCE${i}_[^=]*=['\"]*${current_check}.*['\"]*\s*$/${new_value}SOURCE${i}_HASH=sha512:$hash/"
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=()