Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Jaka Kranjc (75e83da6e7e07ec01f19f903325fac6707ba419f)
  • Date: Fri, 29 Dec 2006 07:07:54 -0600

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

usr/bin/quill | 29 +++++++++----------
var/lib/quill/ChangeLog | 10 ++++++
var/lib/quill/modules/libcore | 59
++++++++++++++++++++++-----------------
var/lib/quill/modules/libdepends | 2 -
var/lib/quill/modules/libdetails | 7 +---
var/lib/quill/modules/libhistory | 6 +--
var/lib/quill/version | 2 -
7 files changed, 66 insertions(+), 49 deletions(-)

New commits:
commit 75e83da6e7e07ec01f19f903325fac6707ba419f
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

quill 0.1.10
various fixes, output beautification, minor cleanup and
a wicked quill_final_put_in_grimoire

diff --git a/usr/bin/quill b/usr/bin/quill
index 78574ad..74512e5 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -22,7 +22,7 @@
## @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_DATE, SPELL_SRC_FILE,
+## @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
@@ -207,7 +207,7 @@ then
i=
for source in $sources
do
- hash=$(hash_get $source)
+ hash=$(quill_hash_get $source)
current_check=$( $if_var; . /DETAILS &> /dev/null; eval echo
\$SOURCE${i}_HASH\$SOURCE${i}_GPG\$SOURCE${i}_IGNORE)

#skip SOURCE_IGNORE
@@ -219,7 +219,7 @@ then
fi

#SOURCE_GPG?
- if grep -q ":.*:" <<< "$current_check"
+ if ! grep -Eq "(sha(512|256|1)|md5):.*:" <<< "$current_check"
then #it is a gpg
if ! query "Do you want to replace SOURCE${i}_GPG with a
hash?" n
then
@@ -274,7 +274,6 @@ message "Done with updating the spell!"
esac

done
- exit 0
else
query_spell_name
query_spell_source_url
@@ -344,11 +343,11 @@ else
add_provides
fi

- if [[ "$QUILL_FMXML_MODE" != "on" ]]
- then
- parse_spell_source_file_info
- fi
+ # redo it for fmxml - so it works if the xml didn't contain a valid source
url
+ # first time for other modes
+ parse_spell_source_file_info
show_spell_source_file_info
+ echo

get_spell_source

@@ -406,14 +405,14 @@ else
then
quill_final_tarball
fi
- message "The spell has been generated and put into:"
- message "$QUILL_SPELL_DIR/$SPELL_NAME"
-# This is broken in a way
-# if query "Do you want to put the spell into one of the avialable
grimoires?" n
-# then
-# quill_final_put_in_grimoire root
-# fi
+ message ""
+ message "The spell has been generated and put into:
$QUILL_SPELL_DIR/$SPELL_NAME"
+ if query "Do you want to put the spell into one of the avialable
grimoires?" n
+ then
+ quill_final_put_in_grimoire
+ fi
fi
+message "That's all folks!"

#---
##
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 4cbda95..b9c34d4 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,13 @@
+2006-12-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * quill: fixed SOURCE_GPG check, reenabled
quill_final_put_in_grimoire,
+ fixed fmxml mode by having it redo parse_spell_source_file_info
+ use quill_hash_get, remove SPELL_DATE
+ * libcore: fixed quill_final_put_in_grimoire,
+ renamed hash_get to quill_hash_get as it overrode the sorcery one
+ * libdetails: use quill_hash_get, use HISTORY_DATE instead of
SPELL_DATE
+ * libhistory, libdepends: cosmetic fixes
+ * version: 0.1.10
+
2006-11-11 Andra?? "ruskie" Levstik <ruskie AT mages.ath.cx>
* libcore: added query_list function from init-manager
* quill: use query_list intead of directcly calling select_list
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 954aa31..f61945e 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -44,15 +44,12 @@ function get_spell_source(){
}

#---
-## @Synopsis hash_get function by afreydknot
+## @Synopsis Print the sha512 hash, a simplified gpg_hashsum
##
#---

-function hash_get() {
- gpg --print-md sha512 \
- "$@" |\
- tr -d '\n ' | tr 'A-F' 'a-f' |\
- awk -F: '{printf $2}'
+function quill_hash_get() {
+ gpg --print-md sha512 "$@" | tr -d '\n ' | tr 'A-F' 'a-f' | cut -d: -f2
}

#---
@@ -156,27 +153,39 @@ function quill_set_executable_bit() {
## @Synopsis function to put the spell into the grimoire
#---
function quill_final_put_in_grimoire() {
- message "You have selected to put the spell into the grimoire"
- message "Please note there will also be a spell tarball(if so desired) in"
- message "${USER_HOME}/${QUILL_SPELLDIR} as will be a spelldir"
- message
"-----------------------------------------------------------------------------"
- message "Into which grimoire do you wish to put the spell(FULL path to
it):"
-# quill_list_grimoires
- read QUILL_GRIM_NAME
- message "Into which section do you wish to put the spell:"
-# quill_list_sections
- read QUILL_SECT_NAME
- message "Now scribling spell into
${QUILL_GRIM_NAME}/${QUILL_SECT_NAME}/${QUILL_SPELL_NAME}"
- cd ${QUILL_SPELL_DIR}/${QUILL_SPELL_NAME}
- mkdir -p ${QUILL_GRIM_NAME}/${QUILL_SECT_NAME}
- cp -r ${SPELL_NAME} ${QUILL_GRIM_NAME}/${QUILL_SECT_NAME}/
- if $? != 0 ; then
- message "Scribbling failed"
+
+ query_list "Into which grimoire do you wish to put the spell:"
QUILL_GRIM_NAME \
+ $(codex_get_all_grimoires | get_basenames)
+ echo
+ QUILL_GRIM_NAME=$(codex_canonicalize_grimoire_name $QUILL_GRIM_NAME)
+
+ # can't use query_list, as the section count can be bigger than the
available index
+ message "Available sections in grimoire $QUILL_GRIM_NAME:"
+ codex_get_section_names $QUILL_GRIM_NAME | column
+ query_string QUILL_SECT_NAME "Into which section do you wish to put the
spell: "
+
+ message "Scribbling spell into
$QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME ..."
+
+ quill_final_put_in_grimoire_sub(){
+ mkdir -p $QUILL_GRIM_NAME/$QUILL_SECT_NAME
+ cp -r $QUILL_SPELL_DIR/$SPELL_NAME $QUILL_GRIM_NAME/$QUILL_SECT_NAME/
+ if [[ $? != 0 ]]; then
+ echo "Scribbling failed!"
+ else
+ echo "Scribbling succeded"
+ echo
+ echo "Running scribe reindex on $QUILL_GRIM_NAME ..."
+ scribe reindex $(basename $QUILL_GRIM_NAME)
+ fi
+ }
+ if [[ $UID == 0 ]]; then
+ quill_final_put_in_grimoire_sub
else
- message "Scribbling succeded"
- message "Now running scribe reindex on ${QUILL_GRIM_NAME}"
- scribe reindex $(basename ${QUILL_GRIM_NAME})
+ export QUILL_GRIM_NAME QUILL_SECT_NAME QUILL_SPELL_DIR SPELL_NAME
+ su -c "$(declare -f quill_final_put_in_grimoire_sub); \
+ quill_final_put_in_grimoire_sub"
fi
+
}

#---
diff --git a/var/lib/quill/modules/libdepends
b/var/lib/quill/modules/libdepends
index c26a293..f54ae68 100644
--- a/var/lib/quill/modules/libdepends
+++ b/var/lib/quill/modules/libdepends
@@ -46,7 +46,7 @@ function add_optional_dependencies() {
message "${QUERY_COLOR}${SPELL_OPTIONAL_DEPENDENCIES[$MN]} needs a
description${DEFAULT_COLOR}"
read SPELL_OPTIONAL_DEPENDENCIES_DESCRIPTION[$MN]

- message "optional_depends \"${SPELL_OPTIONAL_DEPENDENCIES[$MN]}\" \\" >>
DEPENDS
+ 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
diff --git a/var/lib/quill/modules/libdetails
b/var/lib/quill/modules/libdetails
index ec01973..03c357f 100644
--- a/var/lib/quill/modules/libdetails
+++ b/var/lib/quill/modules/libdetails
@@ -177,10 +177,9 @@ function hunt_src_dir(){
## @Synopsis generate DETAILS file
#---
function add_details(){
- message "Generating the DETAILS file..."
+ message "Generating the DETAILS file ..."

- SPELL_DATE=$(date +%Y%m%d)
- QUILL_SPELL_HASH="$(hash_get ${QUILL_TMP_DIR}/${SPELL_SRC_FILE})"
+ QUILL_SPELL_HASH="$(quill_hash_get $QUILL_TMP_DIR/$SPELL_SRC_FILE)"

substitute_with_mirror_variables SPELL_SRC_URL
substitute_with_variables SPELL_SRC_URL "$SPELL_SRC_FILE" SOURCE \
@@ -197,7 +196,7 @@ echo \
SOURCE_DIRECTORY=\"\${BUILD_DIRECTORY}/$SPELL_SRC_DIR\"
WEB_SITE=${SPELL_URL}
LICENSE[0]=${SPELL_LICENSE}
- ENTERED=${SPELL_DATE}
+ ENTERED=${HISTORY_DATE//-/}
SHORT=\"${SPELL_SHORT_DESCRIPTION}\"
cat << EOF
$(fmt -u -w80 ${QUILL_TMP_DIR}/${SPELL_DESC_NAME:-$SPELL_NAME})
diff --git a/var/lib/quill/modules/libhistory
b/var/lib/quill/modules/libhistory
index 17e23b1..b8c3e46 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -4,13 +4,13 @@

function add_history()
{
-message "Generating HISTORY file..."
+message "Generating HISTORY file ..."

echo \
"${HISTORY_DATE} ${GURU_NAME} <${GURU_EMAIL}>
* DETAILS,
${PROVIDESISON}${DEPENDSISON}${CONFIGUREISON}${PREPAREISON}${CONFLICTSISON}${PREBUILDISON}${BUILDISON}${INSTALLISON}${POSTINSTALLISON}${TRIGGERSISON}${FINALISON}HISTORY${BUILD_DTFILE}:
created spell" > HISTORY

-message "Done..."
+message "Done."

}

@@ -43,7 +43,7 @@ function add_history_entries()
add_history_entry "$each"
done

- message "Done ..."
+ message "Done."
}

#---
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 5162470..9767cc9 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.1.9-20060819
+0.1.10



  • [SM-Commit] GIT changes to master quill by Jaka Kranjc (75e83da6e7e07ec01f19f903325fac6707ba419f), Jaka Kranjc, 12/29/2006

Archive powered by MHonArc 2.6.24.

Top of Page