Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Jaka Kranjc (d99fca75353ad5a56e2e2fa9227d9f65cb79cd80)
  • Date: Thu, 12 Jul 2007 07:15:06 -0500

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

var/lib/quill/ChangeLog | 7 +++++++
var/lib/quill/modules/libcore | 14 ++++++++------
var/lib/quill/modules/libgpg | 24 +++++++++++++-----------
var/lib/quill/version | 2 +-
4 files changed, 29 insertions(+), 18 deletions(-)

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

* libcore: fixed mirror indexing in check_source_urls messages
* libgpg: add the new source url after the last mirror url - fixed
ordering
made mirror addition expand the source url
fixed some mirror indices
* version: 0.2.7

single version mirror support is fully functional :)

diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index 106a105..f831146 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-12 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libcore: fixed mirror indexing in check_source_urls messages
+ * libgpg: add the new source url after the last mirror url - fixed
ordering
+ made mirror addition expand the source url
+ fixed some mirror indices
+ * version: 0.2.7
+
2007-07-08 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcore: added complete mirror support to check_source_urls
* libgpg: added mirror support (single version spells only)
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 7092ab1..85769e9 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -243,16 +243,17 @@ function quill_purge() {
## @Globals SPELL_VERSION SPELL_NAME "source_urls" "sources_and_urls"
"version"
#---
function check_source_urls() {
- local su old_su oldest_su source old_source rc i source_num
+ local su old_su oldest_su source old_source rc i source_num mirror_num

message "Checking source urls (this may take a while) ..."
for ((source_num=0; source_num < ${#source_urls[@]}; source_num++))
do
+ mirror_num=0
for su in ${source_urls[$source_num]}
do
if url_verify "$su" > /dev/null
then
- message "SOURCE${i}_URL[$source_num] is ok!"
+ message "SOURCE${i}_URL[$mirror_num] is ok!"
rc=0
else
# first retry with a changed suffix
@@ -260,7 +261,7 @@ function check_source_urls() {
[[ ${su/.gz/.bz2} == $su ]] && su="${su/.bz2/.gz}" ||
su="${su/.gz/.bz2}"
if url_verify "$su" > /dev/null
then
- message "SOURCE${i}_URL[$source_num] is ok after changing the file
extension!"
+ message "SOURCE${i}_URL[$mirror_num] is ok after changing the file
extension!"
# tricky tricky - if we only change the url, it is likely
# that the accompanying SOURCE will be bad. So we need to change
# SOURCEn too. Or just that, if the url contains it as a variable
@@ -304,7 +305,7 @@ function check_source_urls() {
error_msg "probably due to it containing nonstandard variables"
message "Replace it manually with $su"
fi
- add_history_entry "DETAILS: Changed SOURCE${i}_URL[$source_num]
extension"
+ 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
@@ -319,13 +320,14 @@ function check_source_urls() {
rc=0
else
# if they are still not ok ask for fixed ones
- error_msg "SOURCE${i}_URL[$source_num] is hopelessly broken! Fix
it manually."
+ error_msg "SOURCE${i}_URL[$mirror_num] is hopelessly broken! Fix
it manually."
sleep 2
quill_edit DETAILS
- add_history_entry "DETAILS: Fixed SOURCE${i}_URL[$source_num]"
+ add_history_entry "DETAILS: Fixed SOURCE${i}_URL[$mirror_num]"
rc=1
fi
fi
+ let mirror_num++
done
inc_src_num i
done
diff --git a/var/lib/quill/modules/libgpg b/var/lib/quill/modules/libgpg
index 5f7fef6..d4373ef 100644
--- a/var/lib/quill/modules/libgpg
+++ b/var/lib/quill/modules/libgpg
@@ -6,7 +6,7 @@
#---
function convert_to_upstream_gpg() {
local update_counter=${#versions[@]} source su i new_value new_su
new_source
- local version_switch j ll ll_max mirrors
+ local version_switch j ll ll_max mirrors num_of_mirrors
if query "Do you want to do it for $version?" y; then
multiversion_check
SPELL_VERSION="$version"
@@ -21,8 +21,7 @@ function convert_to_upstream_gpg() {
current_check=$(eval ${version_switch:-:}; . DETAILS.orig &>
/dev/null; eval echo
\$SOURCE${i}_HASH\$SOURCE${i}_GPG\$SOURCE${i}_IGNORE\$\{MD5[${i:-0}]\})

read source su mirrors <<< $(sed -n "$ll p" <<< "$sources_and_urls")
-#echo "$source --- $su --- $mirrors"
-# let ll-=1
+ num_of_mirrors=$(wc -w <<< "$mirrors")

if [[ -z $current_check ]]; then
error_msg "Missing SOURCE${i}_HASH/SOURCE${i}_GPG/SOURCE${i}_IGNORE"
@@ -83,9 +82,9 @@ function convert_to_upstream_gpg() {
sed -i "/^\s*SOURCE$i=/
s%^.*$%&\n${new_value}SOURCE${j}=$new_source%" DETAILS
SPELL_UPDATED=y

- # sed in the new su[j] right after su[i]
- new_value=$(count_spaces SOURCE${j}_URL[0])
- sed -i "/^\s*SOURCE${i}_URL\[0\]=/
s%^.*$%&\n${new_value}SOURCE${j}_URL[0]=$SPELL_SIGNATURE%" DETAILS
+ # sed in the new su$j right after su$i or last su$i[]
+ new_value=$(count_spaces SOURCE${j}_URL[$num_of_mirrors])
+ sed -i "/^\s*SOURCE${i}_URL\[$num_of_mirrors\]=/
s%^.*$%&\n${new_value}SOURCE${j}_URL[0]=$SPELL_SIGNATURE%" DETAILS

# ignore the signature
new_value=$(count_spaces SOURCE${j}_IGNORE)
@@ -116,9 +115,9 @@ function convert_to_upstream_gpg() {


# now that the order is pretty much fine, add any other mirrors
- local mirror_url suffix k=$(wc -w <<< "$mirrors")
+ local mirror_url suffix mirror_num=1

- if [[ $k != 0 ]]; then
+ if [[ $num_of_mirrors != 0 ]]; then
# get the suffix that was used from new_source
suffix="${new_source##*.}"

@@ -127,10 +126,13 @@ function convert_to_upstream_gpg() {
for mirror_url in $mirrors; do
if url_verify "$mirror_url.$suffix" > /dev/null; then
# add it after original, first su
- new_value=$(count_spaces SOURCE${j}_URL[$k])
- sed -i "/^\s*SOURCE${i}_URL\[0\]=/
s%^.*$%&\n${new_value}SOURCE${i}_URL[$k]=$mirror_url.$suffix%" DETAILS
+ new_value=$(count_spaces SOURCE${j}_URL[$mirror_num])
+
+ # expand vars first
+ substitute_with_variables mirror_url "$mirror_url"
{SOURCE${i}_URL[$mirror_num]}
+ sed -i "/^\s*SOURCE${j}_URL\[0\]=/
s%^.*$%&\n${new_value}SOURCE${j}_URL[$mirror_num]=$mirror_url.$suffix%"
DETAILS
fi
- let k-=1
+ let mirror_num++
done
fi

diff --git a/var/lib/quill/version b/var/lib/quill/version
index 33395cd..b003284 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2.6-rc9
+0.2.7



  • [SM-Commit] GIT changes to master quill by Jaka Kranjc (d99fca75353ad5a56e2e2fa9227d9f65cb79cd80), Jaka Kranjc, 07/12/2007

Archive powered by MHonArc 2.6.24.

Top of Page