r53257 - in /trunk/dh-make-perl: TODO debian/changelog lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Tue Feb 23 07:49:59 UTC 2010
Author: dmn
Date: Tue Feb 23 07:49:53 2010
New Revision: 53257
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53257
Log:
explain reasons when bumping build-dependencies on debhelper/quilt/etc
Modified:
trunk/dh-make-perl/TODO
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/TODO?rev=53257&op=diff
==============================================================================
--- trunk/dh-make-perl/TODO (original)
+++ trunk/dh-make-perl/TODO Tue Feb 23 07:49:53 2010
@@ -30,4 +30,3 @@
* Don't add libmodule-build-perl to Build-Depends if Makefile.PL is also
present, if its not just Module::Build::Compat
* --make should use Debian::Control::FromCPAN for dependencies
-* when bumping build-dependencies, explain why
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=53257&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Tue Feb 23 07:49:53 2010
@@ -6,6 +6,7 @@
overwriting the later if it exists
* when looking for docs, ignore .svn/ too
* do not crash when APT's package cache cannot be opened
+ * explain reasons when bumping build-dependencies on debhelper/quilt/etc
-- Damyan Ivanov <dmn at debian.org> Fri, 19 Feb 2010 22:47:26 +0200
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=53257&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Tue Feb 23 07:49:53 2010
@@ -2165,6 +2165,29 @@
return ( -f $self->main_file('Build.PL') ) ? "Module-Build" : "MakeMaker";
}
+=item explained_dependency I<$reason>, I<$dependencies>, I<@dependencies>
+
+Adds the list of dependencies to I<$dependencies> and shows I<$reason> if in
+verbose mode.
+
+Used to both bump a dependency ant tell the user why.
+
+I<$dependencies> is an instance of L<Debian::Dependencies> class, and
+I<@dependencies> is a list of L<Debian::Dependency> instances or strings.
+
+The message printed looks like C<< $reason needs @dependencies >>.
+
+=cut
+
+sub explained_dependency {
+ my ( $self, $reason, $deps, @to_add ) = @_;
+
+ $deps->add(@to_add);
+
+ warn sprintf( "%s needs %s\n", $reason, join( ', ', @to_add ) );
+}
+
+
=item discover_utility_deps
Determines whether a certain version of L<debhelper(1)> or L<quilt(1)> is
@@ -2218,18 +2241,25 @@
# start with the minimum
$deps->add( Debian::Dependency->new( 'debhelper', $self->cfg->dh ) );
- $deps->add('debhelper (>= 7.2.13)')
+ $self->explained_dependency( 'Module::AutoInstall', $deps,
+ 'debhelper (>= 7.2.13)' )
if -e catfile( $self->main_dir, qw( inc Module AutoInstall.pm ) );
my $rules = $self->_file_r( $self->debian_file('rules') );
while ( defined( $_ = <$rules> ) ) {
- $deps->add( 'debhelper (>= 7.0.8)', 'quilt (>= 0.46-7)' )
- if /dh\s+.*--with[= ]quilt/;
- $deps->add('debhelper (>= 7.0.50)')
+ $self->explained_dependency(
+ 'dh -with=quilt',
+ $deps,
+ 'debhelper (>= 7.0.8)',
+ 'quilt (>= 0.46-7)',
+ ) if /dh\s+.*--with[= ]quilt/;
+ $self->explained_dependency( 'override_dh_* target',
+ $deps, 'debhelper (>= 7.0.50)' )
if /^override_dh_/;
- $deps->add('quilt')
+ $self->explained_dependency( 'quilt.make', $deps, 'quilt' )
if m{^include /usr/share/quilt/quilt.make};
- $deps->add('debhelper (>= 7.4.4)')
+ $self->explained_dependency( 'dh* --max-parallel',
+ $deps, 'debhelper (>= 7.4.4)' )
if /dh.* --max-parallel/;
}
@@ -2239,8 +2269,12 @@
my $mf = $self->_file_r( $self->main_file('Makefile.PL') );
while( defined( $_ = <$mf> ) ) {
if ( /Module::Build::Compat/ ) {
- $deps->add( 'debhelper (>= 7.0.17)',
- 'perl (>= 5.10) | libmodule-build-perl' );
+ $self->explained_dependency(
+ 'Compatibility Makefile.PL',
+ $deps,
+ 'debhelper (>= 7.0.17)',
+ 'perl (>= 5.10) | libmodule-build-perl'
+ );
last;
}
}
@@ -2250,7 +2284,8 @@
# Since M::B is part of perl 5.10, the build-dependency needs correction
if ( $self->module_build eq 'Module-Build' ) {
$deps->remove('libmodule-build-perl');
- $deps->add('perl (>= 5.10) | libmodule-build-perl');
+ $self->explained_dependency( 'Module::Build', $deps,
+ 'perl (>= 5.10) | libmodule-build-perl' );
}
}
More information about the Pkg-perl-cvs-commits
mailing list