Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Ismael Luceno (f11c33a7d4fd3c7c44a47fdcba9dfca0660ff52c)

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 sorcery by Ismael Luceno (f11c33a7d4fd3c7c44a47fdcba9dfca0660ff52c)
  • Date: Thu, 12 Mar 2015 15:05:12 -0500

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

usr/sbin/sorcery | 7 +++++++
usr/share/man/man8/sorcery.8 | 2 ++
var/lib/sorcery/modules/libqueue | 6 +++++-
3 files changed, 14 insertions(+), 1 deletion(-)

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

sorcery, libqueue: Revert queue to previous downgrading behavior

Add queue-newer command for a no-downgrades queuing mode.

diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 4d8b5a5..3a5a168 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -47,6 +47,7 @@ Optional Parameters:
generate queue of spells needing to be updated.
queue-security Same as queue, but only for spells that need
updating due to security fixes.
+-Z | queue-newer Same as queue, but no gratuitous downgrades.

review-queue Review the install queue for each spell's history
since each was last installed.
@@ -459,6 +460,10 @@ update_security_queue () {
list_install_queue
}

+update_queue_newer() {
+ LIBQUEUE_VERCMP=newer update_queue
+}
+
rebuild() {
local reconfigure=$1

@@ -1943,6 +1948,7 @@ verify_parameters() {
case $1 in
-u|update|-s|system-update|-g|upgrade) true ;;
-q|queue|queue-security) true ;;
+ -Z|queue-newer) true ;;
-r|rebuild|-rr|rebuild-reconfigure) true ;;
add-queue|remove-queue|review-queue) true ;;
hold|unhold|exile|unexile) true ;;
@@ -1965,6 +1971,7 @@ main() {
-g|upgrade) update_pkgs upgrade ;;
-q|queue) update_queue ;;
queue-security) update_security_queue ;;
+ -Z|queue-newer) update_queue_newer ;;
-r|rebuild) rebuild ;;
-rr|rebuild-reconfigure) rebuild -r ;;
review-queue) install_queue_history ;;
diff --git a/usr/share/man/man8/sorcery.8 b/usr/share/man/man8/sorcery.8
index 86b696d..6814db0 100644
--- a/usr/share/man/man8/sorcery.8
+++ b/usr/share/man/man8/sorcery.8
@@ -34,6 +34,8 @@ Update spells without first updating the grimoire.
Compare installed grimoire to installed spells, generate queue of spells
needing to be updated.
.SS queue-security
Queue spells that had updates due to security fixes.
+.SS -Z|queue-newer
+Queue spells with newer versions only (i.e. no downgrades).
.SS -r|rebuild
Automatically rebuilds all installed software packages. This option
is non-interactive except for a bunch of config and depends questions the
first
diff --git a/var/lib/sorcery/modules/libqueue
b/var/lib/sorcery/modules/libqueue
index 876d267..7be01af 100755
--- a/var/lib/sorcery/modules/libqueue
+++ b/var/lib/sorcery/modules/libqueue
@@ -145,7 +145,8 @@ function find_security_updates() {
} ' > $tmp_queue 2> $recheck_queue
}

-awk_version_compare='
+if [ "$LIBQUEUE_VERCMP" = newer ]; then
+ awk_version_compare='
function max(a, b) { return a > b ? a : b }
function version_cmp(v1, v2, i, a, b) {
v1 = max(split(v1, a, /[-_.:+~]/), split(v2, b, /[-_.:+~]/))
@@ -155,6 +156,9 @@ awk_version_compare='
return v2
}
'
+else
+ awk_version_compare='function version_cmp(v1, v2) { return v1 != v2 }'
+fi
function version_compare_gt() {
awk "$awk_version_compare"'
BEGIN {



  • [SM-Commit] GIT changes to master sorcery by Ismael Luceno (f11c33a7d4fd3c7c44a47fdcba9dfca0660ff52c), Ismael Luceno, 03/12/2015

Archive powered by MHonArc 2.6.24.

Top of Page