tags 494739 + pending thanks On Mon, Aug 11, 2008 at 10:32:45PM +0200, Lionel Elie Mamane wrote: > Here is a patch that adds support for programs that don't have a > --version option, in the form of a --version-string option which > specifies the string to be used as version of the program.
Given that this bug has been open, with patch and without comment, for
about an year now, I've took the freedom to prepare and upload a NMU
fixing this (thanks Lionel for the patch!).
To the maintainer time to react, the NMU has been uploaded to
DELAYED/14, and the full diff is attached.
The NMU also takes care of fixing some packaging issues which have
been accumulated (see changelog for details).
Cheers.
--
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..| . |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime
diff -Nru help2man-1.36.4/ChangeLog help2man-1.36.4+nmu1/ChangeLog --- help2man-1.36.4/ChangeLog 2006-02-27 14:44:53.000000000 +0100 +++ help2man-1.36.4+nmu1/ChangeLog 2009-04-17 13:03:45.000000000 +0200 @@ -1,3 +1,9 @@ +help2man (1.36.4.0) unstable; urgency=low + + * Add --version-string option + + -- Lionel Elie Mamane <[email protected]> Mon, 11 Aug 2008 21:18:55 +0200 + help2man (1.36.4) unstable; urgency=low * Add sv translation from Daniel Nylander (closes: #349568). diff -Nru help2man-1.36.4/debian/changelog help2man-1.36.4+nmu1/debian/changelog --- help2man-1.36.4/debian/changelog 2006-02-27 14:44:53.000000000 +0100 +++ help2man-1.36.4+nmu1/debian/changelog 2009-04-17 13:03:50.000000000 +0200 @@ -1,3 +1,16 @@ +help2man (1.36.4+nmu1) unstable; urgency=low + + * Non-maintainer upload. + * Bump debhelper compatibility level to 5 (4 is deprecated now), move + the setting to debian/compat + * Add missing dependency on ${shlibs:Depends}, neede by the .so file + shipped by help2man + * Add --version-string option to support programs which are missing some + sort of --version option. Thanks to Lionel Elie Mamane for the patch. + (Closes: #494739) + + -- Stefano Zacchiroli <[email protected]> Fri, 17 Apr 2009 12:35:34 +0200 + help2man (1.36.4) unstable; urgency=low * Add sv translation from Daniel Nylander (closes: #349568). diff -Nru help2man-1.36.4/debian/compat help2man-1.36.4+nmu1/debian/compat --- help2man-1.36.4/debian/compat 1970-01-01 01:00:00.000000000 +0100 +++ help2man-1.36.4+nmu1/debian/compat 2009-04-17 13:04:04.000000000 +0200 @@ -0,0 +1 @@ +5 diff -Nru help2man-1.36.4/debian/control help2man-1.36.4+nmu1/debian/control --- help2man-1.36.4/debian/control 2003-07-17 17:14:39.000000000 +0200 +++ help2man-1.36.4+nmu1/debian/control 2009-04-17 13:04:29.000000000 +0200 @@ -7,7 +7,7 @@ Package: help2man Architecture: any -Depends: ${perl:Depends} +Depends: ${perl:Depends}, ${shlibs:Depends} Recommends: gettext, liblocale-gettext-perl Description: Automatic manpage generator Program to create simple man pages from the --help and diff -Nru help2man-1.36.4/debian/rules help2man-1.36.4+nmu1/debian/rules --- help2man-1.36.4/debian/rules 2005-10-16 17:35:38.000000000 +0200 +++ help2man-1.36.4+nmu1/debian/rules 2009-04-17 13:04:12.000000000 +0200 @@ -6,7 +6,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=4 SHELL = /bin/bash DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) @@ -95,6 +94,6 @@ configure $(MAKE) maintainer-clean rm -f README ChangeLog $(AM) - + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary maint-prep maint-clean diff -Nru help2man-1.36.4/help2man.info help2man-1.36.4+nmu1/help2man.info --- help2man-1.36.4/help2man.info 2006-02-27 15:05:54.000000000 +0100 +++ help2man-1.36.4+nmu1/help2man.info 2009-04-17 13:03:45.000000000 +0200 @@ -146,6 +146,10 @@ `--version-option=OPTION' version option string +`--version-string=OPTION' + Do not run the program with --version, but use OPTION as version + string. + File: help2man.info, Node: --help recommendations, Next: Makefile usage, Prev: Including text, Up: Top diff -Nru help2man-1.36.4/help2man.PL help2man-1.36.4+nmu1/help2man.PL --- help2man-1.36.4/help2man.PL 2005-10-16 17:38:47.000000000 +0200 +++ help2man-1.36.4+nmu1/help2man.PL 2009-04-17 13:03:45.000000000 +0200 @@ -163,6 +163,7 @@ -h, --help-option=STRING help option string -v, --version-option=STRING version option string + --version-string=STRING version string Report bugs to <[email protected]>. EOT @@ -173,7 +174,7 @@ my $locale = 'C'; my $help_option = '--help'; my $version_option = '--version'; -my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info); +my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info, $version_string); my %opt_def = ( 'n|name=s' => \$opt_name, @@ -188,6 +189,7 @@ 'N|no-info' => \$opt_no_info, 'h|help-option=s' => \$help_option, 'v|version-option=s' => \$version_option, + 'version-string=s' => \$version_string, ); # Parse options. @@ -297,11 +299,26 @@ } # Grab help and version info from executable. -my ($help_text, $version_text) = map { +my ($help_text) = map { join '', map { s/ +$//; expand $_ } `$ARGV[0] $_ 2>/dev/null` or kark N_("%s: can't get `%s' info from %s"), $this_program, $_, $ARGV[0] -} $help_option, $version_option; +} $help_option; + +my $version_text; + +if ($version_string) +{ + $version_text = $version_string . "\n"; +} +else +{ + ($version_text) = map { + join '', map { s/ +$//; expand $_ } `$ARGV[0] $_ 2>/dev/null` + or kark N_("%s: can't get `%s' info from %s"), $this_program, + $_, $ARGV[0] + } $version_option; +} my $date = strftime "%B %Y", localtime; (my $program = $ARGV[0]) =~ s!.*/!!;
signature.asc
Description: Digital signature

