summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2006-05-02 09:27:37 +0000
committerGuillem Jover <guillem@debian.org>2006-05-02 09:27:37 +0000
commit8dabb3837ffc2f480ca59213cdf10db8bd66c026 (patch)
tree89d93525622627c35ed3b2830b1fc6faf278870b /src
parentf74e1ba6f16da3890292fd9c0698b89da73074dd (diff)
downloaddpkg-8dabb3837ffc2f480ca59213cdf10db8bd66c026.tar.gz
Split usage strings to make it easier for translators when those change.
Closes: #323957
Diffstat (limited to 'src')
-rw-r--r--src/main.c98
-rw-r--r--src/query.c35
2 files changed, 79 insertions, 54 deletions
diff --git a/src/main.c b/src/main.c
index 99d68e24e..1044bb372 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,44 +55,56 @@ static void printversion(void) {
static void usage(void) {
if (fprintf (stdout, _(
"Usage: %s [<option> ...] <command>\n"
-"\n"
+"\n"), DPKG) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
"Commands:\n"
-" -i|--install <.deb file name> ... | -R|--recursive <dir> ...\n"
-" --unpack <.deb file name> ... | -R|--recursive <dir> ...\n"
-" -A|--record-avail <.deb file name> ... | -R|--recursive <dir> ...\n"
-" --configure <package-name> ... | -a|--pending\n"
-" -r|--remove <package-name> ... | -a|--pending\n"
-" -P|--purge <package-name> ... | -a|--pending\n"
-" --get-selections [<pattern> ...] Get list of selections to stdout.\n"
-" --set-selections Set package selections from stdin.\n"
-" --clear-selections Deselect every non-essential package.\n"
-" --update-avail <Packages-file> Replace available packages info.\n"
-" --merge-avail <Packages-file> Merge with info from file.\n"
-" --clear-avail Erase existing available info.\n"
-" --forget-old-unavail Forget uninstalled unavailable pkgs.\n"
-" -s|--status <package-name> ... Display package status details.\n"
-" -p|--print-avail <package-name> ... Display available version details.\n"
-" -L|--listfiles <package-name> ... List files `owned' by package(s).\n"
-" -l|--list [<pattern> ...] List packages concisely.\n"
-" -S|--search <pattern> ... Find package(s) owning file(s).\n"
-" -C|--audit Check for broken package(s).\n"
-" --print-architecture Print dpkg architecture.\n"
-" --compare-versions <a> <rel> <b> Compare version numbers - see below.\n"
-" --help Show this help message.\n"
-" --version Show the version.\n"
-" --force-help | -Dh|--debug=help Help on forcing resp. debugging.\n"
-" --license | --licence Print copyright licensing terms.\n"
-"\n"
+" -i|--install <.deb file name> ... | -R|--recursive <directory> ...\n"
+" --unpack <.deb file name> ... | -R|--recursive <directory> ...\n"
+" -A|--record-avail <.deb file name> ... | -R|--recursive <directory> ...\n"
+" --configure <package> ... | -a|--pending\n"
+" -r|--remove <package> ... | -a|--pending\n"
+" -P|--purge <package> ... | -a|--pending\n"
+" --get-selections [<pattern> ...] Get list of selections to stdout.\n"
+" --set-selections Set package selections from stdin.\n"
+" --clear-selections Deselect every non-essential package.\n"
+" --update-avail <Packages-file> Replace available packages info.\n"
+" --merge-avail <Packages-file> Merge with info from file.\n"
+" --clear-avail Erase existing available info.\n"
+" --forget-old-unavail Forget uninstalled unavailable pkgs.\n"
+" -s|--status <package> ... Display package status details.\n"
+" -p|--print-avail <package> ... Display available version details.\n"
+" -L|--listfiles <package> ... List files `owned' by package(s).\n"
+" -l|--list [<pattern> ...] List packages concisely.\n"
+" -S|--search <pattern> ... Find package(s) owning file(s).\n"
+" -C|--audit Check for broken package(s).\n"
+" --print-architecture Print dpkg architecture.\n"
+" --compare-versions <a> <op> <b> Compare version numbers - see below.\n"
+" --force-help Show help on forcing.\n"
+" -Dh|--debug=help Show help on debugging.\n"
+"\n")) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
+" -h|--help Show this help message.\n"
+" --version Show the version.\n"
+" --license|--licence Show the copyright licensing terms.\n"
+"\n")) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
"Use dpkg -b|--build|-c|--contents|-e|--control|-I|--info|-f|--field|\n"
" -x|--extract|-X|--vextract|--fsys-tarfile on archives (type %s --help).\n"
-"\n"
+"\n"), BACKEND) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
"For internal use: dpkg --assert-support-predepends | --predep-package |\n"
" --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep.\n"
-"\n"
+"\n")) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
"Options:\n"
" --admindir=<directory> Use <directory> instead of %s.\n"
-" --root=<directory> Install on alternative system rooted elsewhere.\n"
-" --instdir=<directory> Change inst'n root without changing admin dir.\n"
+" --root=<directory> Install on a different root directory.\n"
+" --instdir=<directory> Change installation dir without changing admin dir.\n"
" -O|--selected-only Skip packages not selected for install/upgrade.\n"
" -E|--skip-same-version Skip packages whose same version is installed.\n"
" -G|--refuse-downgrade Skip packages with earlier version than installed.\n"
@@ -100,21 +112,27 @@ static void usage(void) {
" --no-debsig Do not try to verify package signatures.\n"
" --no-act|--dry-run|--simulate\n"
" Just say what we would do - don't do it.\n"
-" -D|--debug=<octal> Enable debugging - see -Dhelp or --debug=help.\n"
+" -D|--debug=<octal> Enable debugging (see -Dhelp or --debug=help).\n"
" --status-fd <n> Send status change updates to file descriptor <n>.\n"
" --log=<filename> Log status changes and actions to <filename>.\n"
-" --ignore-depends=<package>,... Ignore dependencies involving <package>.\n"
-" --force-... Override problems - see --force-help.\n"
-" --no-force-...|--refuse-... Stop when problems encountered.\n"
-" --abort-after <n> Abort after encountering <n> errors.\n"
-"\n"
+" --ignore-depends=<package>,...\n"
+" Ignore dependencies involving <package>.\n"
+" --force-... Override problems (see --force-help).\n"
+" --no-force-...|--refuse-...\n"
+" Stop when problems encountered.\n"
+" --abort-after <n> Abort after encountering <n> errors.\n"
+"\n"), ADMINDIR) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
"Comparison operators for --compare-versions are:\n"
" lt le eq ne ge gt (treat empty version as earlier than any version);\n"
" lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version);\n"
" < << <= = >= >> > (only for compatibility with control file syntax).\n"
-"\n"
-"Use `dselect' or `aptitude' for user-friendly package management.\n"),
- DPKG, BACKEND, ADMINDIR) < 0) werr ("stdout");
+"\n")) < 0) werr ("stdout");
+
+ if (fprintf (stdout, _(
+"Use `dselect' or `aptitude' for user-friendly package management.\n")) < 0)
+ werr ("stdout");
}
const char thisname[]= "dpkg";
diff --git a/src/query.c b/src/query.c
index d0bc00e76..f49a0990a 100644
--- a/src/query.c
+++ b/src/query.c
@@ -476,22 +476,29 @@ static void printversion(void) {
static void usage(void) {
if (printf(_(
"Usage: %s [<option> ...] <command>\n"
-"\n"
+"\n"), DPKGQUERY) < 0) werr ("stdout");
+
+ if (printf(_(
"Commands:\n"
-" -s|--status <package-name> ... Display package status details.\n"
-" -p|--print-avail <package-name> ... Display available version details.\n"
-" -L|--listfiles <package-name> ... List files `owned' by package(s).\n"
-" -l|--list [<pattern> ...] List packages concisely.\n"
-" -W|--show <pattern> ... Show information on package(s).\n"
-" -S|--search <pattern> ... Find package(s) owning file(s).\n"
-" --help Show this help message.\n"
-" --version Show the version.\n"
-" --license | --licence Show the copyright licensing terms.\n"
-"\n"
+" -s|--status <package> ... Display package status details.\n"
+" -p|--print-avail <package> ... Display available version details.\n"
+" -L|--listfiles <package> ... List files `owned' by package(s).\n"
+" -l|--list [<pattern> ...] List packages concisely.\n"
+" -W|--show <pattern> ... Show information on package(s).\n"
+" -S|--search <pattern> ... Find package(s) owning file(s).\n"
+"\n")) < 0) werr ("stdout");
+
+ if (printf(_(
+" -h|--help Show this help message.\n"
+" --version Show the version.\n"
+" --license|--licence Show the copyright licensing terms.\n"
+"\n")) < 0) werr ("stdout");
+
+ if (printf(_(
"Options:\n"
-" --admindir=<directory> Use <directory> instead of %s.\n"
-" -f|--showformat=<format> Use alternative format for --show.\n"
-"\n"), DPKGQUERY, ADMINDIR) < 0) werr ("stdout");
+" --admindir=<directory> Use <directory> instead of %s.\n"
+" -f|--showformat=<format> Use alternative format for --show.\n"
+"\n"), ADMINDIR) < 0) werr ("stdout");
if (printf(_(
"Format syntax:\n"