Package: devscripts
Version: 2.11.3
Severity: wishlist
The following patches improve options in the program:
0001
- Order items alphabetically.
- Put help and version options last (GNU's suggested convention).
- Present short first, long next (-o, --option; GNU convention)
0002
- Add accompanying short options to all options
- The --help output is now in format: -o, --option
- Change option -v (was --version) to mean -verbose (like in other programs)
Add -V as a short option to --version.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages devscripts depends on:
ii dpkg-dev 1.16.1.2
ii libc6 2.13-26
ii perl 5.14.2-7
ii python 2.7.2-10
ii python2.6 2.6.7-4
ii python2.7 2.7.2-13
>From 6069fa70131e7fae7eda5a0cdc75a8a9d139f9dc Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Wed, 8 Feb 2012 03:52:41 -0500
Subject: [PATCH 2/2] licensecheck.pl: Add short options.
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Update options as follows:
- All options now have accompanying short options
- The --help output is now in format: -o, --option
- Change option -v (was --version) to mean -verbose (like in other programs)
Add -V as a short option to --version.
Signed-off-by: Jari Aalto <[email protected]>
---
scripts/licensecheck.pl | 61 ++++++++++++++++++++++------------------------
1 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 0517bd3..2ecae87 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -43,7 +43,7 @@ the files contained within to the list of files to process.
=over 4
-=item B<--copyright>
+=item B<-C>, B<--copyright>
Also display copyright text found within the file
@@ -65,7 +65,7 @@ should not be considered (e.g. backup files, VCS metadata).
Specify the number of lines of each file's header which should be parsed
for license information. (Default is 60).
-=item B<--no-conf>, B<--noconf>
+=item B<-n>, B<--no-conf>, B<--noconf>
Do not read any configuration files. This can only be used as the first
option given on the command-line.
@@ -75,7 +75,7 @@ option given on the command-line.
Specify that the contents of directories should be added
recursively.
-=item B<--verbose>, B<--no-verbose>
+=item B<-v>, B<--verbose>
Specify whether to output the text being processed from each file before
the corresponding license information.
@@ -86,7 +86,7 @@ Default is to be quiet.
Display short help an exit.
-=item B<--version>
+=item B<-V>, B<--version>
Display version and copyright info
@@ -177,7 +177,7 @@ my $def_lines = 60;
# Read configuration files and then command line
# This is boilerplate
-if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
+if (@ARGV and $ARGV[0] =~ /^(-n|--no-?conf)$/) {
$modified_conf_msg = " (no configuration files read)";
shift;
} else {
@@ -218,17 +218,15 @@ if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
$opt_lines = $config_vars{'LICENSECHECK_PARSELINES'};
}
-GetOptions("help|h" => \$opt_help,
- "version|v" => \$opt_version,
- "verbose!" => \$opt_verbose,
- "lines|l=i" => \$opt_lines,
- "ignore|i=s" => \$opt_ignore_regex,
- "recursive|r" => \$opt_recursive,
- "check|c=s" => \$opt_check_regex,
- "copyright" => \$opt_copyright,
- "noconf" => \$opt_noconf,
- "no-conf" => \$opt_noconf,
- )
+GetOptions("c|check=s" => \$opt_check_regex,
+ "C|copyright" => \$opt_copyright,
+ "h|help" => \$opt_help,
+ "i|ignore=s" => \$opt_ignore_regex,
+ "l|lines=i" => \$opt_lines,
+ "n|no-conf|noconf" => \$opt_noconf,
+ "r|recursive" => \$opt_recursive,
+ "v|verbose!" => \$opt_verbose,
+ "V|Version" => \$opt_version)
or die "Usage: $progname [options] filelist\nRun $progname --help for more details\n";
$opt_lines = $def_lines if $opt_lines !~ /^[1-9][0-9]*$/;
@@ -352,24 +350,23 @@ sub help {
print <<"EOF";
Usage: $progname [options] filename [filename ...]
Valid options are:
- --help, -h Display this message
- --version, -v Display version and copyright info
- --no-conf, --noconf Don't read devscripts config files; must be
- the first option given
- --verbose Display the header of each file before its
- license information
- --lines, -l Specify how many lines of the file header
- should be parsed for license information
- (Default: $def_lines)
- --check, -c Specify a pattern indicating which files should
- be checked
- (Default: '$default_check_regex')
- --recursive, -r Add the contents of directories recursively
- --copyright Also display the file's copyright
- --ignore, -i Specify that files / directories matching the
+ -c, --check RE Specify regexp which files should be checked
+ (Default: '$default_check_regex')
+ -C, --copyright Also display the file's copyright
+ -i, --ignore Specify that files / directories matching the
regular expression should be ignored when
checking files
- (Default: '$default_ignore_regex')
+ (Default: '$default_ignore_regex'
+ -l, --lines Specify how many lines of the file header
+ should be parsed for license information
+ (Default: $def_lines)
+ -n, --no-conf Don't read devscripts config files; must be
+ the first option given
+ -r, --recursive, Add the contents of directories recursively
+ -v, --verbose Display the header of each file before its
+ license information
+ -h, --help, Display this message
+ -V, --version Display version and copyright info)
Default settings modified by devscripts configuration files:
$modified_conf_msg
--
1.7.9
>From 5c5be3313c8906fe87fb5a80161c449a8f890fa5 Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Wed, 8 Feb 2012 03:38:39 -0500
Subject: [PATCH 1/2] licensecheck.pl: (POD::OPTIONS): Order alphabetically.
Add missing --version
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <[email protected]>
---
scripts/licensecheck.pl | 40 ++++++++++++++++++++++++----------------
1 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 9f5de0c..0517bd3 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -43,17 +43,16 @@ the files contained within to the list of files to process.
=over 4
-=item B<--verbose>, B<--no-verbose>
+=item B<--copyright>
-Specify whether to output the text being processed from each file before
-the corresponding license information.
+Also display copyright text found within the file
-Default is to be quiet.
+=item B<-c=>I<regex>, B<--check=>I<regex>
-=item B<-l=>I<N>, B<--lines=>I<N>
+Specify a pattern against which filenames will be matched in order to
+decide which files to check the license of.
-Specify the number of lines of each file's header which should be parsed
-for license information. (Default is 60).
+The default includes common source files.
=item B<-i=>I<regex>, B<--ignore=>I<regex>
@@ -61,26 +60,35 @@ When processing the list of files and directories, the regular
expression specified by this option will be used to indicate those which
should not be considered (e.g. backup files, VCS metadata).
+=item B<-l=>I<N>, B<--lines=>I<N>
+
+Specify the number of lines of each file's header which should be parsed
+for license information. (Default is 60).
+
+=item B<--no-conf>, B<--noconf>
+
+Do not read any configuration files. This can only be used as the first
+option given on the command-line.
+
=item B<-r>, B<--recursive>
Specify that the contents of directories should be added
recursively.
-=item B<-c=>I<regex>, B<--check=>I<regex>
+=item B<--verbose>, B<--no-verbose>
-Specify a pattern against which filenames will be matched in order to
-decide which files to check the license of.
+Specify whether to output the text being processed from each file before
+the corresponding license information.
-The default includes common source files.
+Default is to be quiet.
-=item B<--copyright>
+=item B<-h>, B<--help>
-Also display copyright text found within the file
+Display short help an exit.
-=item B<--no-conf>, B<--noconf>
+=item B<--version>
-Do not read any configuration files. This can only be used as the first
-option given on the command-line.
+Display version and copyright info
=back
--
1.7.9