diff options
author | Joey Hess <joey@kitenet.net> | 2009-08-16 13:22:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2009-08-16 13:22:17 -0400 |
commit | 25ef5b07c717efe64882bee86f38e817520a3b90 (patch) | |
tree | 5a4d9c66a1841a84ef645589bbce0096f8bf4c80 | |
parent | da22465de4cab0e7521d2f706083843be65866a9 (diff) | |
parent | 5e3b38634b5b0a24b30d59b13ac7164dc613afb0 (diff) |
Merge branch 'master' of ssh://git.debian.org/git/debhelper/debhelper
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | debian/changelog | 11 | ||||
-rwxr-xr-x | dh | 34 |
3 files changed, 44 insertions, 3 deletions
@@ -25,7 +25,7 @@ VERSION=$(shell expr "`dpkg-parsechangelog |grep Version:`" : '.*Version: \(.*\) PERLLIBDIR=$(shell perl -MConfig -e 'print $$Config{vendorlib}')/Debian/Debhelper -POD2MAN=pod2man -c Debhelper -r "$(VERSION)" +POD2MAN=pod2man --utf8 -c Debhelper -r "$(VERSION)" # l10n to be built is determined from .po files LANGS=$(notdir $(basename $(wildcard man/po4a/po/*.po))) diff --git a/debian/changelog b/debian/changelog index cf1bcd3a..56f3b400 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (7.3.14) UNRELEASED; urgency=low + + [ Colin Watson ] + * dh: Add --list option to list available addons. + + [ Joey Hess ] + * Run pod2man with --utf8. Closes: #541270 + * dh: Display $@ error if addon load fails. Closes: #541845 + + -- Colin Watson <cjwatson@debian.org> Thu, 13 Aug 2009 09:00:24 +0100 + debhelper (7.3.13) unstable; urgency=low [ Bernd Zeimetz ] @@ -11,7 +11,7 @@ use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS -B<dh> sequence [B<--with> I<addon>[,I<addon>,...]] [B<--until> I<cmd>] [B<--before> I<cmd>] [B<--after> I<cmd>] [B<--remaining>] [S<I<debhelper options>>] +B<dh> sequence [B<--with> I<addon>[,I<addon>,...]] [B<--list>] [B<--until> I<cmd>] [B<--before> I<cmd>] [B<--after> I<cmd>] [B<--remaining>] [S<I<debhelper options>>] =head1 DESCRIPTION @@ -58,6 +58,10 @@ the sequence addon interface. The inverse of --with, disables using the given addon. +=item B<--list>, B<-l> + +List all available addons. + =item B<--until> I<cmd> Run commands in the sequence until and including I<cmd>, then stop. @@ -216,6 +220,8 @@ init(options => { my ($option,$value)=@_; @{$dh{WITH}} = grep { $_ ne $value } @{$dh{WITH}}; }, + "l" => \$dh{LIST}, + "list" => \$dh{LIST}, }); inhibit_log(); @@ -327,12 +333,36 @@ sub add_command { my $sequence=shift; unshift @{$sequences{$sequence}}, $command; } + +if ($dh{LIST}) { + my %addons; + + for my $inc (@INC) { + eval q{use File::Spec}; + my $path = File::Spec->catdir($inc, "Debian/Debhelper/Sequence"); + if (-d $path) { + for my $module_path (glob "$path/*.pm") { + my $name = basename($module_path); + $name =~ s/\.pm$//; + $name =~ s/_/-/g; + $addons{$name} = 1; + } + } + } + + for my $name (sort keys %addons) { + print "$name\n"; + } + + exit 0; +} + foreach my $addon (@{$dh{WITH}}) { my $mod="Debian::Debhelper::Sequence::$addon"; $mod=~s/-/_/g; eval "use $mod"; if ($@) { - error("--with $addon not supported or failed to load module $mod"); + error("unable to load addon $addon: $@"); } } |