summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20110915/e36848de/attachment-0009.obj
blob: 7845b5ea2a89dfada7bd3c655392e771f28799c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(grep_regular_media) factorize a grep for next commit

--- /usr/lib/perl5/vendor_perl/5.12.3/Rpmdrake/open_db.pm.tv8	2011-09-15 13:21:31.996304467 +0000
+++ /usr/lib/perl5/vendor_perl/5.12.3/Rpmdrake/open_db.pm	2011-09-15 13:24:12.932431234 +0000
@@ -125,10 +125,14 @@
     return $res;
 }
 
+sub grep_regular_media {
+    my ($urpm) = @_;
+    grep { $_->{name} !~ /debug|sources/i } @{$urpm->{media}};
+}
+
 sub get_backport_media {
     my ($urpm) = @_;
-    grep { $_->{name} =~ /backport/i && 
-	       $_->{name} !~ /debug|sources/i } @{$urpm->{media}};
+    grep { $_->{name} =~ /backport/i } grep_regular_media($urpm);
 }
 
 sub get_inactive_backport_media {