Hello again, Martin Pitt [2010-11-09 13:51 +0100]: > With this patch, this package will work with just perl-base.
Sorry, previous patch was an old and broken one. This is better. Thanks, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
diff -Nru doc-base-0.9.5/debian/changelog doc-base-0.9.5ubuntu1/debian/changelog --- doc-base-0.9.5/debian/changelog 2009-10-15 11:26:29.000000000 +0200 +++ doc-base-0.9.5ubuntu1/debian/changelog 2010-11-09 13:42:41.000000000 +0100 @@ -1,3 +1,16 @@ +doc-base (0.9.5ubuntu1) natty; urgency=low + + * perl/Debian/DocBase/Programs/Scrollkeeper.pm: Provide our own local + dirname() function and use it instead of File::Basename. + * perl/Debian/DocBase/InstallDocs.pm: Use 'rm -r' and 'mkdir -p' programs + instead of File::Path. + * perl/Debian/DocBase/DB.pm: If Dumper module is not available, exit with an + error that perl needs to be installeld. --dump-db is only required for + debugging. + * debian/rules: Run dh_perl with '-d' to avoid perl dependency. + + -- Martin Pitt <martin.p...@ubuntu.com> Tue, 09 Nov 2010 13:24:19 +0100 + doc-base (0.9.5) unstable; urgency=low * Add a `Typesetting' top-level section for software used to typesetting diff -Nru doc-base-0.9.5/debian/rules doc-base-0.9.5ubuntu1/debian/rules --- doc-base-0.9.5/debian/rules 2009-09-10 21:15:51.000000000 +0200 +++ doc-base-0.9.5ubuntu1/debian/rules 2010-11-09 13:42:22.000000000 +0100 @@ -60,7 +60,7 @@ dh_link dh_compress dh_fixperms - dh_perl + dh_perl -d # dh_python dh_installdeb dh_gencontrol diff -Nru doc-base-0.9.5/perl/Debian/DocBase/DB.pm doc-base-0.9.5ubuntu1/perl/Debian/DocBase/DB.pm --- doc-base-0.9.5/perl/Debian/DocBase/DB.pm 2008-04-07 20:36:39.000000000 +0200 +++ doc-base-0.9.5ubuntu1/perl/Debian/DocBase/DB.pm 2010-11-09 13:41:04.000000000 +0100 @@ -13,7 +13,9 @@ use Carp; use Debian::DocBase::Common; use Debian::DocBase::Utils; -use Data::Dumper; +my $has_dumper = 1; +eval 'use Data::Dumper'; +$has_dumper = 0 if ($@); my $filesdb = undef; my $statusdb = undef; @@ -76,6 +78,11 @@ my $self = shift; my $db = $self->{'DB'}; + unless ($has_dumper) { + print STDERR "Please install the 'perl' package for this operation\n"; + exit 1; + } + my $dumper = Data::Dumper->new([$db], [$self->{'FILE'}]); $dumper->Indent(1); $dumper->Terse(1); diff -Nru doc-base-0.9.5/perl/Debian/DocBase/InstallDocs.pm doc-base-0.9.5ubuntu1/perl/Debian/DocBase/InstallDocs.pm --- doc-base-0.9.5/perl/Debian/DocBase/InstallDocs.pm 2009-04-27 00:57:37.000000000 +0200 +++ doc-base-0.9.5ubuntu1/perl/Debian/DocBase/InstallDocs.pm 2010-11-09 13:02:32.000000000 +0100 @@ -156,8 +156,8 @@ foreach my $d (@dbdirs) { next unless -d $d; rename ($d, $d.$suffix) or croak("Can't rename $d to ${d}${suffix}: $!"); - mkpath ($d, 0, 0755); - rmtree ($d.$suffix, 0, 0); + system ('mkdir', '-m', '0755', '-p', $d); + system ('rm', '-r', $d.$suffix); } unlink $DB_STATUS or croak("Can't remove $DB_STATUS: $!") if -f $DB_STATUS; diff -Nru doc-base-0.9.5/perl/Debian/DocBase/Programs/Scrollkeeper.pm doc-base-0.9.5ubuntu1/perl/Debian/DocBase/Programs/Scrollkeeper.pm --- doc-base-0.9.5/perl/Debian/DocBase/Programs/Scrollkeeper.pm 2008-11-11 14:21:09.000000000 +0100 +++ doc-base-0.9.5ubuntu1/perl/Debian/DocBase/Programs/Scrollkeeper.pm 2010-11-09 13:24:14.000000000 +0100 @@ -17,7 +17,6 @@ use Debian::DocBase::Common; use Debian::DocBase::Utils; use Debian::DocBase::Gettext; -use File::Basename qw(dirname); use UUID; @@ -126,6 +125,13 @@ return $mapping{lc($_[0])}; } # }}} +sub dirname { + my @p = split '/', $_[0]; + return (join '/', @p[0..($#p-1)]) if $#p > 1; + return '/' if substr ($_[0], 0, 1) eq '/'; + return '.'; +} + sub _RemoveOmfFile($) { # {{{ my $omf_file = shift; my $omf_dir = dirname($omf_file);
signature.asc
Description: Digital signature