Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master quill by Ismael Luceno (075f27e0684b97f61ad969f6eedb9d43e3bec87a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Ismael Luceno (075f27e0684b97f61ad969f6eedb9d43e3bec87a)
  • Date: Fri, 1 Oct 2021 13:31:30 +0000

GIT changes to master quill by Ismael Luceno <ismael AT sourcemage.org>:

usr/bin/quill | 10 +++++++---
var/lib/quill/modules/libcopy | 20 +++++++++++++++++---
2 files changed, 24 insertions(+), 6 deletions(-)

New commits:
commit 075f27e0684b97f61ad969f6eedb9d43e3bec87a
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

quill: Avoid signal-handler in URL input loops

BASH changed the context of signal handlers, and now they can't break
out of loops in the triggering context.

It's use has always been a hack, so signal the user wish to ignore the
checks via an empty input string instead.

commit 400825245c7fdebbeb10183007d6e25411554d33
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

libcopy: Update the index instead of re-indexing

This makes initial copies much faster.

diff --git a/usr/bin/quill b/usr/bin/quill
index 7380ba3..a12624e 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -356,14 +356,18 @@ else # no updates, we'll be making a spell
done
query_spell_source_url
# the semirandom fallback url is there to circumvent sorcery bug #13729
- trap break INT
while ! url_verify "${SPELL_SRC_URL:-ftp://34tqgsad}"; > /dev/null; do
error_msg "Invalid URL!\n"
- message "If you're sure it is ok or want to skip this check, just hit ^C
(ctrl-c)."
+ message "Leave blank if you're sure it is ok or want to skip this check."
+ old="$SPELL_SRC_URL"
unset SPELL_SRC_URL
query_spell_source_url
+ if [ -z "$SPELL_SRC_URL" ]; then
+ SPELL_SRC_URL="$old"
+ break
+ fi
done
- trap INT
+ unset old

query_spell_license
query_spell_url
diff --git a/var/lib/quill/modules/libcopy b/var/lib/quill/modules/libcopy
index 1d29f4b..36bbcba 100644
--- a/var/lib/quill/modules/libcopy
+++ b/var/lib/quill/modules/libcopy
@@ -169,7 +169,7 @@ function ask_and_copy_over()
## @param internal flag toggling interactivity - section name
## @param flag toggling scribe reindex, set it to "no" to toggle
##
-## @Globals QUILL_SPELL_DIR SPELL_NAME QUILL_SUDO
+## @Globals QUILL_SPELL_DIR SPELL_NAME SPELL_VERSION QUILL_SUDO
#---
function quill_final_put_in_grimoire() {
local reindex=$3 quill_grim_name quill_sect_name
@@ -216,8 +216,22 @@ function quill_final_put_in_grimoire() {
echo "Copying succeded."
if [[ $1 != no ]]; then
echo
- echo "Running scribe reindex on $quill_grim_name ..."
- $QUILL_SUDO -c "scribe reindex $(basename $quill_grim_name)"
+ echo "Updating indexes on $quill_grim_name ..."
+ $QUILL_SUDO -c "
+ cd $quill_grim_name &&
+ tmp=\$(mktemp tmp.XXXXXX) &&
+ chmod 644 \$tmp &&
+ <<-! cat - codex.index | sort > \$tmp &&
+ $SPELL_NAME $quill_grim_name/$quill_sect_name
+ !
+ mv \$tmp codex.index &&
+ tmp=\$(mktemp tmp.XXXXXX) &&
+ chmod 644 \$tmp &&
+ <<-! cat - version.index | sort > \$tmp &&
+ $SPELL_NAME $SPELL_VERSION 0 0 0
+ !
+ mv \$tmp version.index
+ "
fi
fi
}



  • [SM-Commit] GIT changes to master quill by Ismael Luceno (075f27e0684b97f61ad969f6eedb9d43e3bec87a), Ismael Luceno, 10/01/2021

Archive powered by MHonArc 2.6.24.

Top of Page