Explorar el Código

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.
Guillem Jover hace 11 años
padre
commit
e8fb038202
Se han modificado 2 ficheros con 7 adiciones y 6 borrados
  1. 2 0
      debian/changelog
  2. 5 6
      utils/update-alternatives.c

+ 2 - 0
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.

+ 5 - 6
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