Explorar el Código

Change all programs to accept -? instead of -h for help output

This switch frees the -h option to be used in the distant future for
other purposes, it also uses a character that does not have any other
obvious meaning for help output, and which is pretty safe to be used
blindly by the user in the same way as --help.
Guillem Jover hace 14 años
padre
commit
951542fdc2

+ 1 - 0
debian/changelog

@@ -39,6 +39,7 @@ dpkg (1.16.5) UNRELEASED; urgency=low
   * Cleanup and clarify buffer I/O error reporting. Closes: #621763
   * Cleanup and clarify buffer I/O error reporting. Closes: #621763
   * Avoid full stop and double newline at the end of errors and warnings.
   * Avoid full stop and double newline at the end of errors and warnings.
     Thanks to Jonathan Nieder <jnieder@gmail.com>. Closes: #624000
     Thanks to Jonathan Nieder <jnieder@gmail.com>. Closes: #624000
+  * Change all programs to accept -? instead of -h for help output.
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * Swedish (Peter Krefting).
   * Swedish (Peter Krefting).

+ 2 - 2
dpkg-deb/main.c

@@ -87,7 +87,7 @@ usage(const struct cmdinfo *cip, const char *value)
 "\n"));
 "\n"));
 
 
   printf(_(
   printf(_(
-"  -h|--help                        Show this help message.\n"
+"  -?, --help                       Show this help message.\n"
 "  --version                        Show the version.\n"
 "  --version                        Show the version.\n"
 "\n"));
 "\n"));
 
 
@@ -202,7 +202,7 @@ static const struct cmdinfo cmdinfos[]= {
   { NULL,            'Z', 1, NULL,           NULL,         setcompresstype  },
   { NULL,            'Z', 1, NULL,           NULL,         setcompresstype  },
   { NULL,            'S', 1, NULL,           NULL,         set_compress_strategy },
   { NULL,            'S', 1, NULL,           NULL,         set_compress_strategy },
   { "showformat",    0,   1, NULL,           &showformat,  NULL             },
   { "showformat",    0,   1, NULL,           &showformat,  NULL             },
-  { "help",          'h', 0, NULL,           NULL,         usage            },
+  { "help",          '?', 0, NULL,           NULL,         usage            },
   { "version",       0,   0, NULL,           NULL,         printversion     },
   { "version",       0,   0, NULL,           NULL,         printversion     },
   {  NULL,           0,   0, NULL,           NULL,         NULL             }
   {  NULL,           0,   0, NULL,           NULL,         NULL             }
 };
 };

+ 2 - 2
dpkg-split/main.c

@@ -76,7 +76,7 @@ usage(const struct cmdinfo *cip, const char *value)
 "\n"));
 "\n"));
 
 
   printf(_(
   printf(_(
-"  -h|--help                        Show this help message.\n"
+"  -?, --help                       Show this help message.\n"
 "  --version                        Show the version.\n"
 "  --version                        Show the version.\n"
 "\n"));
 "\n"));
 
 
@@ -143,7 +143,7 @@ static const struct cmdinfo cmdinfos[]= {
   ACTION("listq",   'l',  0,  do_queue),
   ACTION("listq",   'l',  0,  do_queue),
   ACTION("discard", 'd',  0,  do_discard),
   ACTION("discard", 'd',  0,  do_discard),
 
 
-  { "help",         'h',  0,  NULL, NULL,             usage               },
+  { "help",         '?',  0,  NULL, NULL,             usage               },
   { "version",       0,   0,  NULL, NULL,             printversion        },
   { "version",       0,   0,  NULL, NULL,             printversion        },
   { "depotdir",      0,   1,  NULL, &opt_depotdir,    NULL                },
   { "depotdir",      0,   1,  NULL, &opt_depotdir,    NULL                },
   { "partsize",     'S',  1,  NULL, NULL,             setpartsize         },
   { "partsize",     'S',  1,  NULL, NULL,             setpartsize         },

+ 1 - 1
dselect/main.cc

@@ -307,7 +307,7 @@ static const struct cmdinfo cmdinfos[]= {
   { "admindir",     0,   1,  0,  &admindir,  0               },
   { "admindir",     0,   1,  0,  &admindir,  0               },
   { "debug",       'D',  1,  0,  0,          setdebug        },
   { "debug",       'D',  1,  0,  0,          setdebug        },
   { "expert",      'E',  0,  0,  0,          setexpert       },
   { "expert",      'E',  0,  0,  0,          setexpert       },
-  { "help",        'h',  0,  0,  0,          usage           },
+  { "help",        '?',  0,  0,  0,          usage           },
   { "version",      0,   0,  0,  0,          printversion    },
   { "version",      0,   0,  0,  0,          printversion    },
   { "color",        0,   1,  0,  0,          setcolor        }, /* US spelling */
   { "color",        0,   1,  0,  0,          setcolor        }, /* US spelling */
   { "colour",       0,   1,  0,  0,          setcolor        }, /* UK spelling */
   { "colour",       0,   1,  0,  0,          setcolor        }, /* UK spelling */

+ 1 - 1
man/dpkg-architecture.1

@@ -78,7 +78,7 @@ the determined value.
 .B \-L
 .B \-L
 Print a list of valid architecture names.
 Print a list of valid architecture names.
 .TP
 .TP
-.B \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .B \-\-version
 .B \-\-version

+ 1 - 1
man/dpkg-buildpackage.1

@@ -241,7 +241,7 @@ Change the location of the \fBdpkg\fR database. The default location is
 \fI/var/lib/dpkg\fP.
 \fI/var/lib/dpkg\fP.
 .RE
 .RE
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 3 - 3
man/dpkg-checkbuilddeps.1

@@ -1,7 +1,7 @@
 .\" dpkg manual page - dpkg-checkbuilddeps(1)
 .\" dpkg manual page - dpkg-checkbuilddeps(1)
 .\"
 .\"
 .\" Copyright © 2001 Joey Hess <joeyh@debian.org>
 .\" Copyright © 2001 Joey Hess <joeyh@debian.org>
-.\" Copyright © 2007-2011 Guillem Jover <guillem@debian.org>
+.\" Copyright © 2007-2012 Guillem Jover <guillem@debian.org>
 .\" Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org>
 .\" Copyright © 2008-2011 Raphaël Hertzog <hertzog@debian.org>
 .\"
 .\"
 .\" This is free software; you can redistribute it and/or modify
 .\" This is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .
 .
-.TH dpkg\-checkbuilddeps 1 "2012-05-16" "Debian Project" "dpkg utilities"
+.TH dpkg\-checkbuilddeps 1 "2012-05-22" "Debian Project" "dpkg utilities"
 .SH NAME
 .SH NAME
 dpkg\-checkbuilddeps \- check build dependencies and conflicts
 dpkg\-checkbuilddeps \- check build dependencies and conflicts
 .
 .
@@ -61,7 +61,7 @@ Check build dependencies/conflicts assuming that the package described in
 the control file is to be built for the given host architecture instead of
 the control file is to be built for the given host architecture instead of
 the architecture of the current system.
 the architecture of the current system.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-deb.1

@@ -190,7 +190,7 @@ in the current directory is used.
 The target directory (but not its parents) will be created if
 The target directory (but not its parents) will be created if
 necessary.
 necessary.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-distaddfile.1

@@ -48,7 +48,7 @@ is run.
 Read or write the list of files to be uploaded here, rather than using
 Read or write the list of files to be uploaded here, rather than using
 .BR debian/files .
 .BR debian/files .
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-genchanges.1

@@ -148,7 +148,7 @@ how many of the package's source files are being uploaded.
 .B \-q
 .B \-q
 suppresses these messages.
 suppresses these messages.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-gencontrol.1

@@ -138,7 +138,7 @@ if
 .B \-P
 .B \-P
 was used).
 was used).
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-gensymbols.1

@@ -461,7 +461,7 @@ symbols as comments. Furthermore in template mode, pattern symbols
 are followed by comments listing real symbols that have matched the
 are followed by comments listing real symbols that have matched the
 pattern.
 pattern.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-name.1

@@ -69,7 +69,7 @@ This option can used together with the \-s option. If a target
 directory isn't found it will be created automatically.
 directory isn't found it will be created automatically.
 .B Use this option with care.
 .B Use this option with care.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-v ", " \-\-version
 .BR \-v ", " \-\-version

+ 1 - 1
man/dpkg-parsechangelog.1

@@ -53,7 +53,7 @@ which are currently
 .BR /usr/local/lib/dpkg/parsechangelog " and "
 .BR /usr/local/lib/dpkg/parsechangelog " and "
 .BR /usr/lib/dpkg/parsechangelog .
 .BR /usr/lib/dpkg/parsechangelog .
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-query.1

@@ -138,7 +138,7 @@ should use \fBapt\-cache show\fP \fIpackage-name\fP instead
 as the \fIavailable\fP file is only kept up-to-date when
 as the \fIavailable\fP file is only kept up-to-date when
 using \fBdselect\fP.
 using \fBdselect\fP.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .B \-\-version
 .B \-\-version

+ 1 - 1
man/dpkg-scanpackages.1

@@ -97,7 +97,7 @@ Add an X\-Medium field containing the value \fIid-string\fP. This field
 is required if you want to generate \fBPackages.cd\fP files for use
 is required if you want to generate \fBPackages.cd\fP files for use
 by the multicd access method of dselect.
 by the multicd access method of dselect.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-shlibdeps.1

@@ -234,7 +234,7 @@ warnings to be active.
 Change the location of the \fBdpkg\fR database. The default location is
 Change the location of the \fBdpkg\fR database. The default location is
 \fI/var/lib/dpkg\fP.
 \fI/var/lib/dpkg\fP.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-source.1

@@ -115,7 +115,7 @@ command can take supplementary parameters depending on the source format.
 It will error out for formats where this operation doesn't mean anything.
 It will error out for formats where this operation doesn't mean anything.
 
 
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-split.1

@@ -141,7 +141,7 @@ If no
 is specified then the queue is cleared completely; if any are
 is specified then the queue is cleared completely; if any are
 specified then only parts of the relevant package(s) are deleted.
 specified then only parts of the relevant package(s) are deleted.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .BR \-\-version
 .BR \-\-version

+ 1 - 1
man/dpkg-trigger.1

@@ -46,7 +46,7 @@ postinst). Will exit \fB0\fP if a triggers-capable \fBdpkg\fP has run,
 or \fB1\fP with an error message to stderr if not. Normally, however,
 or \fB1\fP with an error message to stderr if not. Normally, however,
 it is better just to activate the desired trigger with \fBdpkg\-trigger\fP.
 it is better just to activate the desired trigger with \fBdpkg\-trigger\fP.
 .TP
 .TP
-.BR \-h ", " \-\-help
+.BR \-? ", " \-\-help
 Show the usage message and exit.
 Show the usage message and exit.
 .TP
 .TP
 .B \-\-version
 .B \-\-version

+ 1 - 1
man/dpkg.1

@@ -293,7 +293,7 @@ Accept a series of commands on input file descriptor \fIn\fP. Note:
 additional options set on the command line, and through this file descriptor,
 additional options set on the command line, and through this file descriptor,
 are not reset for subsequent commands executed during the same run.
 are not reset for subsequent commands executed during the same run.
 .TP
 .TP
-.B \-\-help
+.BR \-? ", " \-\-help
 Display a brief help message.
 Display a brief help message.
 .TP
 .TP
 .B \-\-force\-help
 .B \-\-force\-help

+ 3 - 2
scripts/changelog/debian.pl

@@ -4,6 +4,7 @@
 #
 #
 # Copyright © 1996 Ian Jackson
 # Copyright © 1996 Ian Jackson
 # Copyright © 2005,2007 Frank Lichtenheld
 # Copyright © 2005,2007 Frank Lichtenheld
+# Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +48,7 @@ sub usage {
 "Usage: %s [<option>...] [<changelogfile>]
 "Usage: %s [<option>...] [<changelogfile>]
 
 
 Options:
 Options:
-    --help, -h                  print usage information
+    -?, --help                  print usage information
     --version, -V               print version information
     --version, -V               print version information
     --label, -l <file>          name of the changelog file to
     --label, -l <file>          name of the changelog file to
                                 use in error messages
                                 use in error messages
@@ -97,7 +98,7 @@ GetOptions( "file=s" => \$file,
 	    "to|t=s" => \$to,
 	    "to|t=s" => \$to,
 	    "count|c|n=i" => \$count,
 	    "count|c|n=i" => \$count,
 	    "offset|o=i" => \$offset,
 	    "offset|o=i" => \$offset,
-	    "help|h" => sub{usage();exit(0)},
+	    "help|?" => sub{ usage(); exit(0) },
 	    "version|V" => sub{version();exit(0)},
 	    "version|V" => sub{version();exit(0)},
 	    "format=s" => \&set_format,
 	    "format=s" => \&set_format,
 	    "all|a" => \$all,
 	    "all|a" => \$all,

+ 3 - 3
scripts/dpkg-architecture.pl

@@ -4,7 +4,7 @@
 #
 #
 # Copyright © 1999-2001 Marcus Brinkmann <brinkmd@debian.org>
 # Copyright © 1999-2001 Marcus Brinkmann <brinkmd@debian.org>
 # Copyright © 2004-2005 Scott James Remnant <scott@netsplit.com>,
 # Copyright © 2004-2005 Scott James Remnant <scott@netsplit.com>,
-# Copyright © 2006-2011 Guillem Jover <guillem@debian.org>
+# Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ sub usage {
   -s                 print command to set environment variables.
   -s                 print command to set environment variables.
   -u                 print command to unset environment variables.
   -u                 print command to unset environment variables.
   -c <command>       set environment and run the command in it.
   -c <command>       set environment and run the command in it.
-  --help             show this help message.
+  -?, --help         show this help message.
   --version          show the version.
   --version          show the version.
 "), $progname;
 "), $progname;
 }
 }
@@ -155,7 +155,7 @@ while (@ARGV) {
     } elsif (m/^-L$/) {
     } elsif (m/^-L$/) {
         list_arches();
         list_arches();
         exit unless @ARGV;
         exit unless @ARGV;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
         usage();
         usage();
        exit 0;
        exit 0;
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 1 - 1
scripts/dpkg-buildflags.pl

@@ -80,7 +80,7 @@ while (@ARGV) {
         usageerr(_g("two commands specified: --%s and --%s"), $1, $action)
         usageerr(_g("two commands specified: --%s and --%s"), $1, $action)
             if defined($action);
             if defined($action);
         $action = $1;
         $action = $1;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
         usage();
         usage();
         exit 0;
         exit 0;
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 2 - 2
scripts/dpkg-buildpackage.pl

@@ -76,7 +76,7 @@ sub usage {
   -uc            unsigned .changes file.
   -uc            unsigned .changes file.
       --admindir=<directory>
       --admindir=<directory>
                  change the administrative directory.
                  change the administrative directory.
-  -h, --help     show this help message.
+  -?, --help     show this help message.
       --version  show the version.")
       --version  show the version.")
     . "\n\n" . _g(
     . "\n\n" . _g(
 "Options passed to dpkg-architecture:
 "Options passed to dpkg-architecture:
@@ -151,7 +151,7 @@ sub build_opt() {
 while (@ARGV) {
 while (@ARGV) {
     $_ = shift @ARGV;
     $_ = shift @ARGV;
 
 
-    if (/^(--help|-h)$/) {
+    if (/^(--help|-\?)$/) {
 	usage;
 	usage;
 	exit 0;
 	exit 0;
     } elsif (/^--version$/) {
     } elsif (/^--version$/) {

+ 3 - 2
scripts/dpkg-checkbuilddeps.pl

@@ -3,6 +3,7 @@
 # dpkg-checkbuilddeps
 # dpkg-checkbuilddeps
 #
 #
 # Copyright © 2001 Joey Hess <joeyh@debian.org>
 # Copyright © 2001 Joey Hess <joeyh@debian.org>
+# Copyright © 2006-2009,2011-2012 Guillem Jover <guillem@debian.org>
 # Copyright © 2007-2011 Raphael Hertzog <hertzog@debian.org>
 # Copyright © 2007-2011 Raphael Hertzog <hertzog@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
@@ -52,7 +53,7 @@ sub usage {
   -a arch        assume given host architecture
   -a arch        assume given host architecture
   --admindir=<directory>
   --admindir=<directory>
                  change the administrative directory.
                  change the administrative directory.
-  -h, --help     show this help message.
+  -?, --help     show this help message.
       --version  show the version.")
       --version  show the version.")
 	. "\n\n" . _g(
 	. "\n\n" . _g(
 "<control-file> is the control file to process (default: debian/control).")
 "<control-file> is the control file to process (default: debian/control).")
@@ -65,7 +66,7 @@ my ($bd_value, $bc_value);
 my $host_arch = get_host_arch();
 my $host_arch = get_host_arch();
 if (!GetOptions('A' => \$ignore_bd_arch,
 if (!GetOptions('A' => \$ignore_bd_arch,
                 'B' => \$ignore_bd_indep,
                 'B' => \$ignore_bd_indep,
-                'help|h' => sub { usage(); exit(0); },
+                'help|?' => sub { usage(); exit(0); },
                 'version' => \&version,
                 'version' => \&version,
                 'd=s' => \$bd_value,
                 'd=s' => \$bd_value,
                 'c=s' => \$bc_value,
                 'c=s' => \$bc_value,

+ 3 - 2
scripts/dpkg-distaddfile.pl

@@ -3,6 +3,7 @@
 # dpkg-distaddfile
 # dpkg-distaddfile
 #
 #
 # Copyright © 1996 Ian Jackson
 # Copyright © 1996 Ian Jackson
+# Copyright © 2006-2008,2010,2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +48,7 @@ sub usage {
 
 
 Options:
 Options:
   -f<files-list-file>      write files here instead of debian/files.
   -f<files-list-file>      write files here instead of debian/files.
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.
       --version            show the version.
 "), $progname;
 "), $progname;
 }
 }
@@ -56,7 +57,7 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
     $_=shift(@ARGV);
     $_=shift(@ARGV);
     if (m/^-f/) {
     if (m/^-f/) {
         $fileslistfile= $';
         $fileslistfile= $';
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
         usage();
         usage();
         exit(0);
         exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 3 - 2
scripts/dpkg-genchanges.pl

@@ -4,6 +4,7 @@
 #
 #
 # Copyright © 1996 Ian Jackson
 # Copyright © 1996 Ian Jackson
 # Copyright © 2000,2001 Wichert Akkerman
 # Copyright © 2000,2001 Wichert Akkerman
+# Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -130,7 +131,7 @@ sub usage {
   -T<substvars-file>       read variables here, not debian/substvars.
   -T<substvars-file>       read variables here, not debian/substvars.
   -D<field>=<value>        override or add a field and value.
   -D<field>=<value>        override or add a field and value.
   -U<field>                remove a field.
   -U<field>                remove a field.
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.
       --version            show the version.
 "), $progname;
 "), $progname;
 }
 }
@@ -183,7 +184,7 @@ while (@ARGV) {
         $remove{$1} = 1;
         $remove{$1} = 1;
     } elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:](.*)$/s) {
     } elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:](.*)$/s) {
 	$substvars->set($1, $2);
 	$substvars->set($1, $2);
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
 	usage();
 	usage();
 	exit(0);
 	exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 2 - 2
scripts/dpkg-gencontrol.pl

@@ -87,7 +87,7 @@ sub usage {
   -U<field>                remove a field.
   -U<field>                remove a field.
   -V<name>=<value>         set a substitution variable.
   -V<name>=<value>         set a substitution variable.
   -T<substvars-file>       read variables here, not debian/substvars.
   -T<substvars-file>       read variables here, not debian/substvars.
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.
       --version            show the version.
 "), $progname;
 "), $progname;
 }
 }
@@ -125,7 +125,7 @@ while (@ARGV) {
 	$substvars_loaded = 1;
 	$substvars_loaded = 1;
     } elsif (m/^-n/) {
     } elsif (m/^-n/) {
         $forcefilename= $';
         $forcefilename= $';
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
         usage();
         usage();
         exit(0);
         exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 2 - 2
scripts/dpkg-gensymbols.pl

@@ -86,7 +86,7 @@ sub usage {
   -a<arch>                 assume <arch> as host architecture when processing
   -a<arch>                 assume <arch> as host architecture when processing
                            symbol files.
                            symbol files.
   -d                       display debug information during work.
   -d                       display debug information during work.
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.
       --version            show the version.
 "), $progname;
 "), $progname;
 }
 }
@@ -131,7 +131,7 @@ while (@ARGV) {
 	$verbose_output = 1;
 	$verbose_output = 1;
     } elsif (m/^-a(.+)$/) {
     } elsif (m/^-a(.+)$/) {
 	$host_arch = $1;
 	$host_arch = $1;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
 	usage();
 	usage();
 	exit(0);
 	exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 2 - 2
scripts/dpkg-maintscript-helper.sh

@@ -1,8 +1,8 @@
 #!/bin/sh
 #!/bin/sh
 #
 #
+# Copyright © 2007,2011-2012 Guillem Jover <guillem@debian.org>
 # Copyright © 2010 Raphaël Hertzog <hertzog@debian.org>
 # Copyright © 2010 Raphaël Hertzog <hertzog@debian.org>
 # Copyright © 2008 Joey Hess <joeyh@debian.org>
 # Copyright © 2008 Joey Hess <joeyh@debian.org>
-# Copyright © 2007 Guillem Jover (modifications on wiki.debian.org)
 # Copyright © 2005 Scott James Remnant (original implementation on www.dpkg.org)
 # Copyright © 2005 Scott James Remnant (original implementation on www.dpkg.org)
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
@@ -289,7 +289,7 @@ rm_conffile)
 mv_conffile)
 mv_conffile)
 	mv_conffile "$@"
 	mv_conffile "$@"
 	;;
 	;;
---help|help|-?|-h)
+--help|help|-?)
 	usage
 	usage
 	;;
 	;;
 --version)
 --version)

+ 2 - 1
scripts/dpkg-mergechangelogs.pl

@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 #!/usr/bin/perl
 
 
 # Copyright © 2009-2010 Raphaël Hertzog <hertzog@debian.org>
 # Copyright © 2009-2010 Raphaël Hertzog <hertzog@debian.org>
+# Copyright © 2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -65,7 +66,7 @@ sub usage {
 Options:
 Options:
   --merge-prereleases, -m  merge pre-releases together, ignores everything
   --merge-prereleases, -m  merge pre-releases together, ignores everything
                            after the last '~' in the version.
                            after the last '~' in the version.
-  --help, -h, -?           show this help message.
+  -?, --help               show this help message.
   --version                show the version.
   --version                show the version.
 "), $progname);
 "), $progname);
 }
 }

+ 3 - 3
scripts/dpkg-name.pl

@@ -3,7 +3,7 @@
 # dpkg-name
 # dpkg-name
 #
 #
 # Copyright © 1995,1996 Erick Branderhorst <branderh@debian.org>.
 # Copyright © 1995,1996 Erick Branderhorst <branderh@debian.org>.
-# Copyright © 2009 Guillem Jover <guillem@debian.org>.
+# Copyright © 2006-2010,2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ Options:
   -k, --symlink            don't create a new file, but a symlink.
   -k, --symlink            don't create a new file, but a symlink.
   -s, --subdir [dir]       move file into subdir (use with care).
   -s, --subdir [dir]       move file into subdir (use with care).
   -c, --create-dir         create target dir if not there (use with care).
   -c, --create-dir         create target dir if not there (use with care).
-  -h, --help               show this help message.
+  -?, --help               show this help message.
   -v, --version            show the version.
   -v, --version            show the version.
 
 
 file.deb changes to <package>_<version>_<architecture>.<package_type>
 file.deb changes to <package>_<version>_<architecture>.<package_type>
@@ -219,7 +219,7 @@ sub move($)
 
 
 while (@ARGV) {
 while (@ARGV) {
     $_ = shift(@ARGV);
     $_ = shift(@ARGV);
-    if (m/^-[h?]|--help$/) {
+    if (m/^-\?|--help$/) {
         usage();
         usage();
         exit(0);
         exit(0);
     } elsif (m/^-v|--version$/) {
     } elsif (m/^-v|--version$/) {

+ 3 - 2
scripts/dpkg-parsechangelog.pl

@@ -4,6 +4,7 @@
 #
 #
 # Copyright © 1996 Ian Jackson
 # Copyright © 1996 Ian Jackson
 # Copyright © 2001 Wichert Akkerman
 # Copyright © 2001 Wichert Akkerman
+# Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +48,7 @@ sub usage {
   -l<changelog-file>       get per-version info from this file.
   -l<changelog-file>       get per-version info from this file.
   -F<changelog-format>     force changelog format.
   -F<changelog-format>     force changelog format.
   -L<libdir>               look for changelog parsers in <libdir>.
   -L<libdir>               look for changelog parsers in <libdir>.
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.")
       --version            show the version.")
     . "\n\n" . _g(
     . "\n\n" . _g(
 "Parser options:
 "Parser options:
@@ -104,7 +105,7 @@ while (@ARGV) {
 	}
 	}
     } elsif (m/^--all$/) {
     } elsif (m/^--all$/) {
 	$options{"all"} = undef;
 	$options{"all"} = undef;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
 	usage(); exit(0);
 	usage(); exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {
 	version(); exit(0);
 	version(); exit(0);

+ 3 - 3
scripts/dpkg-scanpackages.pl

@@ -2,7 +2,7 @@
 #
 #
 # dpkg-scanpackages
 # dpkg-scanpackages
 #
 #
-# Copyright © 2006-2011 Guillem Jover <guillem@debian.org>
+# Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ my %options = (help            => sub { usage(); exit 0; },
 	      );
 	      );
 
 
 my $result = GetOptions(\%options,
 my $result = GetOptions(\%options,
-                        'help|h|?', 'version', 'type|t=s',
+                        'help|?', 'version', 'type|t=s',
                         'arch|a=s', 'multiversion|m!', 'extra-override|e=s',
                         'arch|a=s', 'multiversion|m!', 'extra-override|e=s',
                         'medium|M=s');
                         'medium|M=s');
 
 
@@ -73,7 +73,7 @@ Options:
   -e, --extra-override <file>
   -e, --extra-override <file>
                            use extra override file.
                            use extra override file.
   -M, --medium <medium>    add X-Medium field for dselect multicd access method
   -M, --medium <medium>    add X-Medium field for dselect multicd access method
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.
       --version            show the version.
 "), $progname;
 "), $progname;
 }
 }

+ 3 - 2
scripts/dpkg-shlibdeps.pl

@@ -5,6 +5,7 @@
 # Copyright © 1996 Ian Jackson
 # Copyright © 1996 Ian Jackson
 # Copyright © 2000 Wichert Akkerman
 # Copyright © 2000 Wichert Akkerman
 # Copyright © 2006 Frank Lichtenheld
 # Copyright © 2006 Frank Lichtenheld
+# Copyright © 2006-2010,2012 Guillem Jover <guillem@debian.org>
 # Copyright © 2007 Raphaël Hertzog
 # Copyright © 2007 Raphaël Hertzog
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
@@ -88,7 +89,7 @@ foreach (@ARGV) {
 	push @pkg_dir_to_search, $1;
 	push @pkg_dir_to_search, $1;
     } elsif (m/^-O$/) {
     } elsif (m/^-O$/) {
 	$stdout = 1;
 	$stdout = 1;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
 	usage(); exit(0);
 	usage(); exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {
 	version(); exit(0);
 	version(); exit(0);
@@ -567,7 +568,7 @@ sub usage {
   --ignore-missing-info    don't fail if dependency information can't be found.
   --ignore-missing-info    don't fail if dependency information can't be found.
   --warnings=<value>       define set of active warnings (see manual page).
   --warnings=<value>       define set of active warnings (see manual page).
   --admindir=<directory>   change the administrative directory.
   --admindir=<directory>   change the administrative directory.
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.")
       --version            show the version.")
     . "\n\n" . _g(
     . "\n\n" . _g(
 "Dependency fields recognised are:
 "Dependency fields recognised are:

+ 2 - 2
scripts/dpkg-source.pl

@@ -191,7 +191,7 @@ while (@options) {
         $substvars->set($1, $2);
         $substvars->set($1, $2);
     } elsif (m/^-T(.*)$/) {
     } elsif (m/^-T(.*)$/) {
 	$substvars->load($1) if -e $1;
 	$substvars->load($1) if -e $1;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
         usage();
         usage();
         exit(0);
         exit(0);
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {
@@ -510,7 +510,7 @@ sub usage {
   --require-valid-signature abort if the package doesn't have a valid signature")
   --require-valid-signature abort if the package doesn't have a valid signature")
     . "\n\n" . _g(
     . "\n\n" . _g(
 "General options:
 "General options:
-  -h, --help               show this help message.
+  -?, --help               show this help message.
       --version            show the version.")
       --version            show the version.")
     . "\n\n" . _g(
     . "\n\n" . _g(
 "More options are available but they depend on the source package format.
 "More options are available but they depend on the source package format.

+ 2 - 1
scripts/dpkg-vendor.pl

@@ -3,6 +3,7 @@
 # dpkg-vendor
 # dpkg-vendor
 #
 #
 # Copyright © 2009 Raphaël Hertzog <hertzog@debian.org>
 # Copyright © 2009 Raphaël Hertzog <hertzog@debian.org>
+# Copyright © 2009,2012 Guillem Jover <guillem@debian.org>
 #
 #
 # This program is free software; you can redistribute it and/or modify
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # it under the terms of the GNU General Public License as published by
@@ -65,7 +66,7 @@ while (@ARGV) {
         $action = $1;
         $action = $1;
         $param = shift(@ARGV);
         $param = shift(@ARGV);
         usageerr(_g("%s needs a parameter"), $_) unless defined $param;
         usageerr(_g("%s needs a parameter"), $_) unless defined $param;
-    } elsif (m/^-(h|-help)$/) {
+    } elsif (m/^-(\?|-help)$/) {
         usage();
         usage();
         exit 0;
         exit 0;
     } elsif (m/^--version$/) {
     } elsif (m/^--version$/) {

+ 2 - 2
src/main.c

@@ -115,7 +115,7 @@ usage(const struct cmdinfo *ci, const char *value)
 "\n"));
 "\n"));
 
 
   printf(_(
   printf(_(
-"  -h|--help                        Show this help message.\n"
+"  -?, --help                       Show this help message.\n"
 "  --version                        Show the version.\n"
 "  --version                        Show the version.\n"
 "\n"));
 "\n"));
 
 
@@ -682,7 +682,7 @@ static const struct cmdinfo cmdinfos[]= {
   { "refuse",            0,   2, NULL,          NULL,      setforce,      0 },
   { "refuse",            0,   2, NULL,          NULL,      setforce,      0 },
   { "no-force",          0,   2, NULL,          NULL,      setforce,      0 },
   { "no-force",          0,   2, NULL,          NULL,      setforce,      0 },
   { "debug",             'D', 1, NULL,          NULL,      setdebug,      0 },
   { "debug",             'D', 1, NULL,          NULL,      setdebug,      0 },
-  { "help",              'h', 0, NULL,          NULL,      usage,         0 },
+  { "help",              '?', 0, NULL,          NULL,      usage,         0 },
   { "version",           0,   0, NULL,          NULL,      printversion,  0 },
   { "version",           0,   0, NULL,          NULL,      printversion,  0 },
   ACTIONBACKEND( "build",		'b', BACKEND),
   ACTIONBACKEND( "build",		'b', BACKEND),
   ACTIONBACKEND( "contents",		'c', BACKEND),
   ACTIONBACKEND( "contents",		'c', BACKEND),

+ 2 - 2
src/querycmd.c

@@ -772,7 +772,7 @@ usage(const struct cmdinfo *ci, const char *value)
 "\n"));
 "\n"));
 
 
   printf(_(
   printf(_(
-"  -h|--help                        Show this help message.\n"
+"  -?, --help                       Show this help message.\n"
 "  --version                        Show the version.\n"
 "  --version                        Show the version.\n"
 "\n"));
 "\n"));
 
 
@@ -819,7 +819,7 @@ static const struct cmdinfo cmdinfos[]= {
   { "admindir",   0,   1, NULL, &admindir,   NULL          },
   { "admindir",   0,   1, NULL, &admindir,   NULL          },
   { "load-avail", 0,   0, &opt_loadavail, NULL, NULL, 1    },
   { "load-avail", 0,   0, &opt_loadavail, NULL, NULL, 1    },
   { "showformat", 'f', 1, NULL, &showformat, NULL          },
   { "showformat", 'f', 1, NULL, &showformat, NULL          },
-  { "help",       'h', 0, NULL, NULL,        usage         },
+  { "help",       '?', 0, NULL, NULL,        usage         },
   { "version",    0,   0, NULL, NULL,        printversion  },
   { "version",    0,   0, NULL, NULL,        printversion  },
   {  NULL,        0,   0, NULL, NULL,        NULL          }
   {  NULL,        0,   0, NULL, NULL,        NULL          }
 };
 };

+ 2 - 2
src/statcmd.c

@@ -2,7 +2,7 @@
  * dpkg-statoverride - override ownership and mode of files
  * dpkg-statoverride - override ownership and mode of files
  *
  *
  * Copyright © 2000, 2001 Wichert Akkerman <wakkerma@debian.org>
  * Copyright © 2000, 2001 Wichert Akkerman <wakkerma@debian.org>
- * Copyright © 2006-2010 Guillem Jover <guillem@debian.org>
+ * Copyright © 2006-2012 Guillem Jover <guillem@debian.org>
  *
  *
  * This is free software; you can redistribute it and/or modify
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * it under the terms of the GNU General Public License as published by
@@ -336,7 +336,7 @@ static const struct cmdinfo cmdinfos[] = {
 	{ "quiet",      0,   0,  &opt_verbose, NULL,      NULL, 0       },
 	{ "quiet",      0,   0,  &opt_verbose, NULL,      NULL, 0       },
 	{ "force",      0,   0,  &opt_force,   NULL,      NULL, 1       },
 	{ "force",      0,   0,  &opt_force,   NULL,      NULL, 1       },
 	{ "update",     0,   0,  &opt_update,  NULL,      NULL, 1       },
 	{ "update",     0,   0,  &opt_update,  NULL,      NULL, 1       },
-	{ "help",       'h', 0,  NULL,         NULL,      usage         },
+	{ "help",       '?', 0,  NULL,         NULL,      usage         },
 	{ "version",    0,   0,  NULL,         NULL,      printversion  },
 	{ "version",    0,   0,  NULL,         NULL,      printversion  },
 	{  NULL,        0                                               }
 	{  NULL,        0                                               }
 };
 };

+ 2 - 2
src/trigcmd.c

@@ -76,7 +76,7 @@ usage(const struct cmdinfo *ci, const char *value)
 "\n"));
 "\n"));
 
 
 	printf(_(
 	printf(_(
-"  -h|--help                        Show this help message.\n"
+"  -?, --help                       Show this help message.\n"
 "  --version                        Show the version.\n"
 "  --version                        Show the version.\n"
 "\n"));
 "\n"));
 
 
@@ -199,7 +199,7 @@ static const struct cmdinfo cmdinfos[] = {
 	{ "no-await",        0,   0, NULL,     &bypackage, noawait },
 	{ "no-await",        0,   0, NULL,     &bypackage, noawait },
 	{ "no-act",          0,   0, &f_noact, NULL,       NULL, 1 },
 	{ "no-act",          0,   0, &f_noact, NULL,       NULL, 1 },
 	{ "check-supported", 0,   0, &f_check, NULL,       NULL, 1 },
 	{ "check-supported", 0,   0, &f_check, NULL,       NULL, 1 },
-	{ "help",            'h', 0, NULL,     NULL,       usage   },
+	{ "help",            '?', 0, NULL,     NULL,       usage   },
 	{ "version",         0,   0, NULL,     NULL,       printversion  },
 	{ "version",         0,   0, NULL,     NULL,       printversion  },
 	{  NULL  }
 	{  NULL  }
 };
 };