r54545 - in /trunk/dh-make-perl/lib/DhMakePerl/Command: Packaging.pm make.pm refresh.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Mar 19 07:04:22 UTC 2010
Author: dmn
Date: Fri Mar 19 07:04:07 2010
New Revision: 54545
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54545
Log:
provide a wrapper around control->discover_dependencies in Packaging
the wrapper is handy as discover_dependencies takes quite a lot of
parameters we want to set in one place
Modified:
trunk/dh-make-perl/lib/DhMakePerl/Command/Packaging.pm
trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
trunk/dh-make-perl/lib/DhMakePerl/Command/refresh.pm
Modified: trunk/dh-make-perl/lib/DhMakePerl/Command/Packaging.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Command/Packaging.pm?rev=54545&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Command/Packaging.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Command/Packaging.pm Fri Mar 19 07:04:07 2010
@@ -1032,6 +1032,41 @@
warn sprintf( "%s needs %s\n", $reason, join( ', ', @to_add ) );
}
+=item discover_dependencies
+
+Just a wrapper around $self->control->discover_dependencies which provides the
+right parameters to it.
+
+=cut
+
+sub discover_dependencies {
+ my $self = shift;
+
+ if ( my $apt_contents = $self->get_apt_contents ) {
+
+ my $wnpp_query
+ = Debian::WNPP::Query->new(
+ { cache_file => catfile( $self->cfg->home_dir, 'wnpp.cache' ) } )
+ if $self->cfg->network;
+
+ warn 10;
+
+ $self->control->discover_dependencies(
+ { dir => $self->main_dir,
+ verbose => $self->cfg->verbose,
+ apt_contents => $self->apt_contents,
+ require_deps => $self->cfg->requiredeps,
+ wnpp_query => $wnpp_query,
+ }
+ );
+ }
+ else {
+ warn "No APT contents can be loaded.\n";
+ warn "Please install 'apt-file' package and run 'apt-file update'\n";
+ warn "as root.\n";
+ warn "Dependencies not updated.\n";
+ }
+}
=item discover_utility_deps
Modified: trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm?rev=54545&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Command/make.pm Fri Mar 19 07:04:07 2010
@@ -126,18 +126,7 @@
my $apt_contents = $self->get_apt_contents;
my $src = $self->control->source;
- $self->control->discover_dependencies(
- { dir => $self->main_dir,
- verbose => $self->cfg->verbose,
- apt_contents => $self->apt_contents,
- require_deps => $self->cfg->requiredeps,
- wnpp_query => Debian::WNPP::Query->new(
- { cache_file =>
- catfile( $self->cfg->home_dir, 'wnpp.cache' )
- }
- ),
- }
- );
+ $self->discover_dependencies;
$bin->Depends->add( $self->cfg->depends )
if $self->cfg->depends;
Modified: trunk/dh-make-perl/lib/DhMakePerl/Command/refresh.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Command/refresh.pm?rev=54545&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Command/refresh.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Command/refresh.pm Fri Mar 19 07:04:07 2010
@@ -80,27 +80,7 @@
$self->write_source_format(
catfile( $self->debian_dir, 'source', 'format' ) );
- if ( my $apt_contents = $self->get_apt_contents ) {
- $control->discover_dependencies(
- { dir => $self->main_dir,
- verbose => $self->cfg->verbose,
- apt_contents => $self->apt_contents,
- require_deps => $self->cfg->requiredeps,
- wnpp_query => Debian::WNPP::Query->new(
- { cache_file =>
- catfile( $self->cfg->home_dir, 'wnpp.cache' )
- }
- ),
- }
- );
- }
- else {
- warn "No APT contents can be loaded.\n";
- warn
- "Please install 'apt-file' package and run 'apt-file update'\n";
- warn "as root.\n";
- warn "Dependencies not updated.\n";
- }
+ $self->discover_dependencies;
$self->discover_utility_deps($control);
$control->prune_perl_deps();
More information about the Pkg-perl-cvs-commits
mailing list