[lintian] 01/03: Ensure Lintian::Collect::Source::binaries are ordered
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit aa9ea53e055ec79166ce838e81133a9bd271c26b
Author: Mathieu Parent <math.parent@gmail.com>
Date: Sat Feb 22 17:39:04 2014 +0100
Ensure Lintian::Collect::Source::binaries are ordered
This is needed by the phppear check to get the main (i.e. the first) package.
Closes: #739671
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/Collect/Source.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index e468a15..9f20922 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -191,8 +191,8 @@ Needs-Info requirements for using I<binaries>: L<Same as binary_package_type|/bi
sub binaries {
my ($self) = @_;
# binary_package_type does all the work for us.
- $self->binary_package_type('') unless exists $self->{binaries};
- return keys %{ $self->{binaries} };
+ $self->_load_dctrl unless exists $self->{binary_names};
+ return @{ $self->{binary_names} };
}
=item binary_package_type (BINARY)
@@ -369,6 +369,7 @@ sub _load_dctrl {
$ok = 1 if -e $dctrl;
}
+ $self->{binary_names} = [];
unless ($ok) {
# Bad file, assume the package and field does not exist.
$self->{binary_field} = {};
@@ -396,6 +397,7 @@ sub _load_dctrl {
my $pkg = $binary->{'package'};
next unless defined($pkg) and $pkg =~ m{\A $PKGNAME_REGEX \Z}xsmo;
$packages{$pkg} = $binary;
+ push(@{$self->{binary_names} }, $pkg);
}
$self->{binary_field} = \%packages;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: