aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-03-19 14:49:17 +0000
committerThierry Vignaud <tv@mandriva.org>2009-03-19 14:49:17 +0000
commitd7a685b9fa14f29a18671e980565d61b5267c74d (patch)
tree377bd2b6a4cb316118c75c65ca4d640a5d037517
parentaff84f71451528f25e6f2f5ae1f862b0e85fc399 (diff)
downloadrpmdrake-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)
-rw-r--r--Rpmdrake/open_db.pm7
-rw-r--r--Rpmdrake/pkg.pm5
2 files changed, 6 insertions, 6 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();
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 10d7fe2f..3f06a293 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -201,11 +201,6 @@ sub download_callback {
my (@update_medias, $is_update_media_already_asked);
-sub get_update_medias {
- my ($urpm) = @_;
- grep { !$_->{ignore} && $_->{update} } @{$urpm->{media}};
-}
-
sub warn_about_media {
my ($w, $opts) = @_;