Skip to Content.
Sympa Menu

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

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 (e2ab376f16da2c53b8c9c54a6a7078bfc1acbaea)
  • Date: Sun, 19 Apr 2009 06:04:03 -0500

GIT changes to master quill by Andraž Levstik <ruskie+2054d253 AT codemages.net>:

usr/bin/quill | 12 +++++++++---
var/lib/quill/ChangeLog | 8 ++++++++
var/lib/quill/modules/libcore | 34 +++++++++++++++++++++++++++-------
var/lib/quill/modules/libupdate | 16 ++++++++++++++++
var/lib/quill/version | 2 +-
5 files changed, 61 insertions(+), 11 deletions(-)

New commits:
commit e2ab376f16da2c53b8c9c54a6a7078bfc1acbaea
Author: Andraž Levstik <ruskie+2054d253 AT codemages.net>
Commit: Andraž Levstik <ruskie+2054d253 AT codemages.net>

some new config options, added gen_patch for updates

commit 2a71ee8362e4b1e69424ead2a493f7da05f53e57
Author: Andraž Levstik <ruskie+2054d253 AT codemages.net>
Commit: Andraž Levstik <ruskie+2054d253 AT codemages.net>

libcore: fixed the add executable bit to files sxipping due to reading
and writting on stdin

diff --git a/usr/bin/quill b/usr/bin/quill
index cdb6c0d..8da7f9b 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -39,7 +39,7 @@ QUILL_SPELL_DIR=~/.sourcemage/spells
QUILL_TMP_DIR=~/.sourcemage/tmp
QUILL_LIB_DIR=/var/lib/quill
QUILL_MODULES=$QUILL_LIB_DIR/modules
-QUILL_OUR_CONFIG_VERSION=2
+QUILL_OUR_CONFIG_VERSION=3
QUILL_CONFIG_VERSION=$QUILL_OUR_CONFIG_VERSION

#---
@@ -203,11 +203,17 @@ then
check_description_wrap

rm DETAILS.orig
- if query "Do you want to review the update or add custom
modifications?" y
+ if query "Do you want to review the update or add custom
modifications?" \
+ ${QUILL_MODIFICATIONS:-n}
then
quill_edit
echo
fi
+ if query "Do you want to generate a patch for the update?" \
+ ${QUILL_GEN_PATCH:-n}
+ then
+ quill_generate_patch
+ fi

echo
message "Done with updating the spell!"
@@ -483,7 +489,7 @@ else # no updates, we'll be making a spell
then
quill_edit
fi
- if query "Do you want to tarball the spell?" n
+ if query "Do you want to tarball the spell?" ${QUILL_TARBALL_SPELL:-n}
then
quill_final_tarball
fi
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 4e65a1b..7c75d8f 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-19 Andraž "ruskie" Levstik <ruskie+f03a580f AT codemages.net>
+ * libcore: fixed the issue of auto jumping over the Add executable
bit to
+ file, also this is better as it more specific on what files need it
+ * version: 0.3.0-rc15, 0.3.0-rc16
+ * quill: added geN-patch
+ * libcore: added config queries for some annoying defaults
+ * libupdate: added gen_patch to generate a version update patch
+
2009-01-18 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libdeprecation: don't require a valid spell name for renames #15176
quoted the quick quill history injection example
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 599a932..318b7e7 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -113,6 +113,21 @@ function quill_rc() {
if query "Do you use guru GPG signatures?" $saved ; then
query_list "${QUERY_COLOR}Please select one of the following keys as
the guru signing key${DEFAULT_COLOR}" GURU_GPGKEY "$GURU_GPGKEY" $(gpg -K |
sed -n "/^sec[^#]/ s,^sec\s*[^/]*/\(\S*\)\s.*$,\1,p")
fi
+ if query "${QUERY_COLOR}Do you wish to always generate a spell
tarball?${DEFAULT_COLOR}" "${QUILL_TARBALL_SPELL:-n}" ; then
+ QUILL_TARBALL_SPELL=y
+ else
+ QUILL_TARBALL_SPELL=n
+ fi
+ if query "${QUERY_COLOR}Do you want to always review
modifications?${DEFAULT_COLOR}" "${QUILL_MODIFICATIONS:-n}" ; then
+ QUILL_MODIFICATIONS=y
+ else
+ QUILL_MODIFICATIONS=n
+ fi
+ if query "${QUERY_COLOR}Do you want to always generate a patch on
updates?${DEFAULT_COLOR}" "${QUILL_GEN_PATCH:-n}" ; then
+ QUILL_GEN_PATCH=y
+ else
+ QUILL_GEN_PATCH=n
+ fi

message "Thank you. Now generating ${QUILL_QUILLRC}"
cat << QUA > $QUILL_QUILLRC
@@ -123,6 +138,9 @@ function quill_rc() {
QUILL_GIT_DIR="$QUILL_GIT_DIR"
QUILL_SUDO="$QUILL_SUDO"
GURU_GPGKEY="$GURU_GPGKEY"
+ QUILL_TARBALL_SPELL="$QUILL_TARBALL_SPELL"
+ QUILL_MODIFICATIONS="$QUILL_MODIFICATIONS"
+ QUILL_GEN_PATCH="$QUILL_GEN_PATCH"
QUA
mkdir -p "$QUILL_SPELL_DIR" "$QUILL_GIT_DIR"
exit 0
@@ -447,13 +465,15 @@ function clear_html_specials(){
function check_executable_bits(){
local file

- find $QUILL_SPELL_DIR/$SPELL_NAME -type f \
- -wholename '*/[A-Z][A-Z]*[A-Z]' ! -perm /111 |
- grep -vE
"HISTORY|TESTS|WIP|MAINTAINER|README|LICENSE|PROVIDES|REPAIR|EXPORTS" |
- while read file; do
- message "${file##*/} does not have the executable bit set!"
- if query "Do you want to add it?" y; then
- chmod +x "$file"
+ # we know what files should be executable so only check those
+ local spell_executable_files="PREPARE DETAILS CONFIGURE DEPENDS PRE_BUILD
BUILD POST_BUILD PRE_INSTALL INSTALL POST_INSTALL FINAL CONFLICTS TRIGGERS
UP_TRIGGERS DOWNLOAD PRE_REMOVE POST_REMOVE PRE_RESURRECT SUB_DEPENDS
PRE_SUB_DEPENDS TRIGGER_CHECK INSTALL_EXTRAS POST_RESURRECT"
+ for file in $spell_executable_files ; do
+ if [[ -e $QUILL_SPELL_DIR/$SPELL_NAME/$file ]] &&
+ [[ ! -x $QUILL_SPELL_DIR/$SPELL_NAME/$file ]] ; then
+ message "$file does not have the executable bit set!"
+ if query "Do you want to add it?" y ; then
+ chmod +x "$QUILL_SPELL_DIR/$SPELL_NAME/$file"
+ fi
fi
done
}
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index 1e0250b..b670725 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -213,6 +213,9 @@ function version_bump() {

#save the chosen version
sed -i "s/\sVERSION=['\"]*${version}['\"]*\s*$/ VERSION=$SPELL_VERSION/"
DETAILS
+ # this is needed for gen_patch
+ OLD_SPELL_VERSION="$version"
+
SPELL_UPDATED=y

#check for multiversion spells
@@ -360,6 +363,19 @@ function main_update_loop() {
}

#---
+## @Synopsis Generates a unified diff between the old and the new version
+## @Synopsis upon update
+##
+#---
+quill_generate_patch(){
+ codex_get_spell_paths $(codex_find_spell_by_name $SPELL_NAME)
+ message "Generating update patch"
+ diff -Nuar "$GRIMOIRE/$SECTION/$SPELL_NAME" "$QUILL_SPELL_DIR/$SPELL_NAME"
> \
+
"$QUILL_SPELL_DIR/$SPELL_NAME-$OLD_SPELL_VERSION-to-$SPELL_VERSION.patch"
+ unset_spell_paths
+}
+
+#---
##
## This software is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 5de8dad..3cb33bb 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.3.0-rc15
+0.3.0-rc16




Archive powered by MHonArc 2.6.24.

Top of Page