[Reproducible-commits] [dpkg] 09/61: u-a: Move current best alternative from the trail to the head

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 09:56:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit e8fb0382021ccb2baf704a19653477250952a844
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Dec 18 20:56:11 2014 +0100

    u-a: Move current best alternative from the trail to the head
    
    No callers have been found in Debian parsing the best version of an
    alternative.
---
 debian/changelog            |  2 ++
 utils/update-alternatives.c | 11 +++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9389db3..30c0f72 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ dpkg (1.18.3) UNRELEASED; urgency=low
   * Fix short-lived memory leaks in start-stop-daemon. As a side effect now
     a missing group after ‘:’ on --chuid is a fatal error.
   * Print the master and slave links in «update-alternatives --display».
+  * Print the current best alternative in the head instead of the trail
+    in «update-alternatives --display», with a two space indentation.
   * Perl modules:
     - Only warn on invalid week days instead of aborting in
       Dpkg::Changelog::Entry::Debian. Regression introduced in dpkg 1.18.2.
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 10be8a3..f598659 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -1533,6 +1533,11 @@ alternative_display_user(struct alternative *a)
 	struct slave_link *sl;
 
 	pr("%s - %s", a->master_name, alternative_status_describe(a->status));
+	fs = alternative_get_best(a);
+	if (fs)
+		pr(_("  link best version is %s"), fs->master_file);
+	else
+		pr(_("  link best version not available"));
 	current = alternative_get_current(a);
 	if (current) {
 		pr(_("  link currently points to %s"), current);
@@ -1551,12 +1556,6 @@ alternative_display_user(struct alternative *a)
 				   fileset_get_slave(fs, sl->name));
 		}
 	}
-
-	fs = alternative_get_best(a);
-	if (fs)
-		pr(_("Current 'best' version is '%s'."), fs->master_file);
-	else
-		pr(_("No versions available."));
 }
 
 static void

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list