[SCM] Debian package checker branch, infra-513663, updated. 2.5.0-rc1-121-g96b50fe
The following commit has been merged in the infra-513663 branch:
commit af3526934befb7441e6ad180f702f0aede305caa
Author: Niels Thykier <niels@thykier.net>
Date: Fri Apr 1 21:37:29 2011 +0200
Added a remove_processable method to L::PG
diff --git a/lib/Lintian/ProcessableGroup.pm b/lib/Lintian/ProcessableGroup.pm
index c53acb8..921418b 100644
--- a/lib/Lintian/ProcessableGroup.pm
+++ b/lib/Lintian/ProcessableGroup.pm
@@ -202,6 +202,27 @@ sub get_processables {
return wantarray ? @result : \@result;
}
+=item $group->remove_processable($proc)
+
+Removes $proc from $group
+
+=cut
+
+sub remove_processable {
+ my ($self, $proc) = @_;
+ my $pkg_type = $proc->pkg_type();
+ if ($pkg_type eq 'source' or $pkg_type eq 'changes'){
+ delete $self->{$pkg_type};
+ } elsif (defined $self->{$pkg_type}) {
+ my $phash = $self->{$pkg_type};
+ my $name = $proc->pkg_name();
+ my $version = $proc->pkg_version();
+ my $arch = $proc->pkg_arch();
+ delete $phash->{"${name}_${version}_${arch}"};
+ }
+ return 1;
+}
+
=item $group->get_source_processable()
Returns the processable identified as the "source" package (e.g. the dsc).
--
Debian package checker
Reply to: