Parcourir la source

u-a: Add missing options to --help output

Document --get-selections, --set-selections, --log and --force.
Split the huge string into smaller pieces to ease translators work.
Guillem Jover il y a 15 ans
Parent
commit
f0266cd69c
2 fichiers modifiés avec 15 ajouts et 4 suppressions
  1. 1 0
      debian/changelog
  2. 14 4
      utils/update-alternatives.c

+ 1 - 0
debian/changelog

@@ -12,6 +12,7 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     instead invoke the command ourselves and feed the status information
     instead invoke the command ourselves and feed the status information
     to its standard input. Suggested by Raphaël Hertzog.
     to its standard input. Suggested by Raphaël Hertzog.
   * Add missing space in update-alternative --set-selections output.
   * Add missing space in update-alternative --set-selections output.
+  * Add missing options to update-alternative --help output.
 
 
   [ Raphaël Hertzog ]
   [ Raphaël Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854
   * Fail properly when debian/source/format is empty. Closes: #600854

+ 14 - 4
utils/update-alternatives.c

@@ -95,7 +95,9 @@ usage(void)
 {
 {
 	printf(_(
 	printf(_(
 "Usage: %s [<option> ...] <command>\n"
 "Usage: %s [<option> ...] <command>\n"
-"\n"
+"\n"), PROGNAME);
+
+	printf(_(
 "Commands:\n"
 "Commands:\n"
 "  --install <link> <name> <path> <priority>\n"
 "  --install <link> <name> <path> <priority>\n"
 "    [--slave <link> <name> <path>] ...\n"
 "    [--slave <link> <name> <path>] ...\n"
@@ -106,11 +108,15 @@ usage(void)
 "  --display <name>         display information about the <name> group.\n"
 "  --display <name>         display information about the <name> group.\n"
 "  --query <name>           machine parseable version of --display <name>.\n"
 "  --query <name>           machine parseable version of --display <name>.\n"
 "  --list <name>            display all targets of the <name> group.\n"
 "  --list <name>            display all targets of the <name> group.\n"
+"  --get-selections         list master alternative names and their status.\n"
+"  --set-selections         read alternative status from standard input.\n"
 "  --config <name>          show alternatives for the <name> group and ask the\n"
 "  --config <name>          show alternatives for the <name> group and ask the\n"
 "                           user to select which one to use.\n"
 "                           user to select which one to use.\n"
 "  --set <name> <path>      set <path> as alternative for <name>.\n"
 "  --set <name> <path>      set <path> as alternative for <name>.\n"
 "  --all                    call --config on all alternatives.\n"
 "  --all                    call --config on all alternatives.\n"
-"\n"
+"\n"));
+
+	printf(_(
 "<link> is the symlink pointing to %s/<name>.\n"
 "<link> is the symlink pointing to %s/<name>.\n"
 "  (e.g. /usr/bin/pager)\n"
 "  (e.g. /usr/bin/pager)\n"
 "<name> is the master name for this link group.\n"
 "<name> is the master name for this link group.\n"
@@ -119,17 +125,21 @@ usage(void)
 "  (e.g. /usr/bin/less)\n"
 "  (e.g. /usr/bin/less)\n"
 "<priority> is an integer; options with higher numbers have higher priority in\n"
 "<priority> is an integer; options with higher numbers have higher priority in\n"
 "  automatic mode.\n"
 "  automatic mode.\n"
-"\n"
+"\n"), altdir);
+
+	printf(_(
 "Options:\n"
 "Options:\n"
 "  --altdir <directory>     change the alternatives directory.\n"
 "  --altdir <directory>     change the alternatives directory.\n"
 "  --admindir <directory>   change the administrative directory.\n"
 "  --admindir <directory>   change the administrative directory.\n"
+"  --log <file>             change the log file.\n"
+"  --force                  allow replacing files with alternative links.\n"
 "  --skip-auto              skip prompt for alternatives correctly configured\n"
 "  --skip-auto              skip prompt for alternatives correctly configured\n"
 "                           in automatic mode (relevant for --config only)\n"
 "                           in automatic mode (relevant for --config only)\n"
 "  --verbose                verbose operation, more output.\n"
 "  --verbose                verbose operation, more output.\n"
 "  --quiet                  quiet operation, minimal output.\n"
 "  --quiet                  quiet operation, minimal output.\n"
 "  --help                   show this help message.\n"
 "  --help                   show this help message.\n"
 "  --version                show the version.\n"
 "  --version                show the version.\n"
-), PROGNAME, altdir);
+));
 }
 }
 
 
 static void DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1)
 static void DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1)