aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/open_db.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake/open_db.pm')
-rw-r--r--Rpmdrake/open_db.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index 4010b048..565559e1 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -33,7 +33,7 @@ use feature 'state';
use Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw(fast_open_urpmi_db get_inactive_backport_media open_rpm_db open_urpmi_db);
+our @EXPORT = qw(fast_open_urpmi_db get_inactive_backport_media get_update_medias open_rpm_db open_urpmi_db);
# because rpm blocks some signals when rpm DB is opened, we don't keep open around:
@@ -111,6 +111,11 @@ sub get_inactive_backport_media {
map { $_->{name} } grep { $_->{ignore} && $_->{name} =~ /backport/i && $_->{name} !~ /debug|sources/i } @{$urpm->{media}};
}
+sub get_update_medias {
+ my ($urpm) = @_;
+ grep { !$_->{ignore} && $_->{update} } @{$urpm->{media}};
+}
+
sub open_urpmi_db {
my (%urpmi_options) = @_;
my $urpm = fast_open_urpmi_db();