Просмотр исходного кода

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

Guillem Jover лет назад: 11
Родитель
Сommit
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 ]
   [ Guillem Jover ]
   * Fix short-lived memory leaks in start-stop-daemon. As a side effect now
   * Fix short-lived memory leaks in start-stop-daemon. As a side effect now
     a missing group after ‘:’ on --chuid is a fatal error.
     a missing group after ‘:’ on --chuid is a fatal error.
+  * Print the master and slave links in «update-alternatives --display».
   * Perl modules:
   * Perl modules:
     - Only warn on invalid week days instead of aborting in
     - Only warn on invalid week days instead of aborting in
       Dpkg::Changelog::Entry::Debian. Regression introduced in dpkg 1.18.2.
       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.
 Display information about the link group.
 Information displayed includes the group's mode
 Information displayed includes the group's mode
 (auto or manual),
 (auto or manual),
+the master and slave links,
 which alternative the master link currently points to,
 which alternative the master link currently points to,
 what other alternatives are available
 what other alternatives are available
 (and their corresponding slave alternatives),
 (and their corresponding slave alternatives),

+ 3 - 0
utils/update-alternatives.c

@@ -1539,6 +1539,9 @@ alternative_display_user(struct alternative *a)
 	} else {
 	} else {
 		pr(_("  link currently absent"));
 		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) {
 	for (fs = a->choices; fs; fs = fs->next) {
 		pr(_("%s - priority %d"), fs->master_file, fs->priority);
 		pr(_("%s - priority %d"), fs->master_file, fs->priority);