Преглед изворни кода

u-a: Print master and slave links on --display

Guillem Jover пре 11 година
родитељ
комит
55661248cc
3 измењених фајлова са 5 додато и 0 уклоњено
  1. 1 0
      debian/changelog
  2. 1 0
      man/update-alternatives.1
  3. 3 0
      utils/update-alternatives.c

+ 1 - 0
debian/changelog

@@ -3,6 +3,7 @@ dpkg (1.18.3) UNRELEASED; urgency=low
   [ Guillem Jover ]
   * 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».
   * Perl modules:
     - Only warn on invalid week days instead of aborting in
       Dpkg::Changelog::Entry::Debian. Regression introduced in dpkg 1.18.2.

+ 1 - 0
man/update-alternatives.1

@@ -302,6 +302,7 @@ to point to the highest priority installed alternatives.
 Display information about the link group.
 Information displayed includes the group's mode
 (auto or manual),
+the master and slave links,
 which alternative the master link currently points to,
 what other alternatives are available
 (and their corresponding slave alternatives),

+ 3 - 0
utils/update-alternatives.c

@@ -1539,6 +1539,9 @@ alternative_display_user(struct alternative *a)
 	} else {
 		pr(_("  link currently absent"));
 	}
+	pr(_("  link %s is %s"), a->master_name, a->master_link);
+	for (sl = a->slaves; sl; sl = sl->next)
+		pr(_("  slave %s is %s"), sl->name, sl->link);
 
 	for (fs = a->choices; fs; fs = fs->next) {
 		pr(_("%s - priority %d"), fs->master_file, fs->priority);