[dh-make-perl] 01/04: Debian::Control::FromCPAN: find_debs_for_modules(): exit version loop.
gregor herrmann
gregoa at debian.org
Mon Apr 11 21:08:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository dh-make-perl.
commit da5ca5ce0a48036e4a72e8b6807eacbeccc1a108
Author: gregor herrmann <gregoa at debian.org>
Date: Mon Apr 11 22:21:52 2016 +0200
Debian::Control::FromCPAN: find_debs_for_modules(): exit version loop.
When searching for versioned dependency, the method issues the warning
"$module package in APT ($d) does not satisfy $dep"
even when higher versions are available.
The reason is that the change in 51f6896 loops over all versions of a
package in AptPkg::Cache in descending order, and then may warn even if a
good enough version has been seen before.
Exit the loop as soon as we have a high enough version.
Caveat: This version can be from any suite, since AptPkg::Cache and
AptPkg::Config don't seem to offer information about suites.
---
lib/Debian/Control/FromCPAN.pm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/Debian/Control/FromCPAN.pm b/lib/Debian/Control/FromCPAN.pm
index 3a457a2..c2f9622 100644
--- a/lib/Debian/Control/FromCPAN.pm
+++ b/lib/Debian/Control/FromCPAN.pm
@@ -363,12 +363,10 @@ sub find_debs_for_modules {
if ( my $available = $pkg->{VersionList} ) {
for my $v ( @$available ) {
my $d = Debian::Dependency->new( $dep->pkg, '=', $v->{VerStr} );
- unless ( $d->satisfies($dep) )
- {
- push @missing, $module;
- print "$module package in APT ($d) does not satisfy $dep"
- if $verbose;
- }
+ last if $d->satisfies($dep); # exit loop if we have a good version; otherwise:
+ push @missing, $module;
+ print "$module package in APT ($d) does not satisfy $dep"
+ if $verbose;
}
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git
More information about the Pkg-perl-cvs-commits
mailing list