X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FPackages.pm;h=6974c1778d1a3fc4b1d71cbc45f15793ada267d6;hb=a844a562081aab9ae8489c293d2f38026b6e87b1;hp=5c4d22367d78a7eb66f0156109b9d54969fe0478;hpb=5b550d03e9214a7980a5cd4897cf9de09d89749b;p=debbugs.git diff --git a/Debbugs/Packages.pm b/Debbugs/Packages.pm index 5c4d223..6974c17 100644 --- a/Debbugs/Packages.pm +++ b/Debbugs/Packages.pm @@ -12,7 +12,7 @@ package Debbugs::Packages; use warnings; use strict; -use base qw(Exporter); +use Exporter qw(import); use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS @EXPORT); use Carp; @@ -39,7 +39,7 @@ use Storable qw(dclone); use Params::Validate qw(validate_with :types); use Debbugs::Common qw(make_list globify_scalar sort_versions); -use List::Util qw(min max); +use List::AllUtils qw(min max); use IO::File; @@ -72,7 +72,8 @@ our $_pkgcomponent; our $_srcpkg; sub getpkgsrc { return $_pkgsrc if $_pkgsrc; - return {} unless defined $Debbugs::Packages::gPackageSource; + return {} unless defined $config{package_source} and + length $config{package_source}; my %pkgsrc; my %pkgcomponent; my %srcpkg; @@ -234,7 +235,6 @@ sub binary_to_source{ } } else { - my $found_one_version = 0; for my $version (@versions) { next unless exists $bin->{$version}; if (exists $bin->{$version}{all}) { @@ -530,7 +530,6 @@ sub makesourceversions { arch => 'source', versions => '0.1.1', guess_source => 1, - debug => \$debug, warnings => \$warnings, ); @@ -573,7 +572,6 @@ sub make_source_versions { }, ); my ($warnings) = globify_scalar(exists $param{warnings}?$param{warnings}:undef); - my ($debug) = globify_scalar(exists $param{debug} ?$param{debug} :undef); my @packages = grep {defined $_ and length $_ } make_list($param{package}); my @archs = grep {defined $_ } make_list ($param{arch}); @@ -610,7 +608,7 @@ sub make_source_versions { my @bin_versions = sourcetobinary($1,$version); if (not @bin_versions or @{$bin_versions[0]} != 3) { - print {$warnings} "The source $1 and version $2 do not appear to match any binary packages\n"; + print {$warnings} "The source '$1' and version '$version' do not appear to match any binary packages\n"; } next; }