aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Shared/urpmi_backend/DB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ManaTools/Shared/urpmi_backend/DB.pm')
-rw-r--r--lib/ManaTools/Shared/urpmi_backend/DB.pm26
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/ManaTools/Shared/urpmi_backend/DB.pm b/lib/ManaTools/Shared/urpmi_backend/DB.pm
index 817f2f13..0f58b5cf 100644
--- a/lib/ManaTools/Shared/urpmi_backend/DB.pm
+++ b/lib/ManaTools/Shared/urpmi_backend/DB.pm
@@ -343,7 +343,7 @@ sub get_inactive_backport_media {
#=============================================================
-=head2 get_update_medias
+=head2 get_update_media
=head3 INPUT
@@ -356,7 +356,7 @@ sub get_inactive_backport_media {
=cut
#=============================================================
-sub get_update_medias {
+sub get_update_media {
my ($self, $urpm) = @_;
if ($self->is_it_a_devel_distro()) {
grep { !$_->{ignore} } @{$urpm->{media}};
@@ -367,6 +367,26 @@ sub get_update_medias {
#=============================================================
+=head2 get_active_media
+
+=head3 INPUT
+
+ $urpm: an urpm object
+
+=head3 DESCRIPTION
+
+ This method returns a list of active media
+
+=cut
+
+#=============================================================
+sub get_active_media {
+ my ($self, $urpm) = @_;
+ grep { $_->{name} !~ /debug|testing|backport/i } @{$urpm->{media}};
+}
+
+#=============================================================
+
=head2 open_urpmi_db
=head3 INPUT
@@ -376,7 +396,7 @@ sub get_update_medias {
=head3 DESCRIPTION
- This method returns an urpm option with a lcok on db
+ This method returns an urpm option with a lock on db
=cut