diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-03-19 14:49:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-03-19 14:49:17 +0000 |
commit | d7a685b9fa14f29a18671e980565d61b5267c74d (patch) | |
tree | 377bd2b6a4cb316118c75c65ca4d640a5d037517 /Rpmdrake/open_db.pm | |
parent | aff84f71451528f25e6f2f5ae1f862b0e85fc399 (diff) | |
download | rpmdrake-d7a685b9fa14f29a18671e980565d61b5267c74d.tar rpmdrake-d7a685b9fa14f29a18671e980565d61b5267c74d.tar.gz rpmdrake-d7a685b9fa14f29a18671e980565d61b5267c74d.tar.bz2 rpmdrake-d7a685b9fa14f29a18671e980565d61b5267c74d.tar.xz rpmdrake-d7a685b9fa14f29a18671e980565d61b5267c74d.zip |
(get_update_medias) move it from Rpmdrake::pkgs into Rpmdrake::open_db
where resides get_inactive_backport_media()
(more logical place and will be used by mdkapplet)
Diffstat (limited to 'Rpmdrake/open_db.pm')
-rw-r--r-- | Rpmdrake/open_db.pm | 7 |
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(); |