diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-09-11 17:07:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-09-11 17:07:59 +0000 |
commit | 13da6ea62a67bd541bb4515af24bcc4ad692dcf7 (patch) | |
tree | 0bdbcb070cb453d800b07e51fdbd2a8f81e8b753 | |
parent | 90865702432235a309cc4454c2c269cdef1aef63 (diff) | |
download | rpmdrake-13da6ea62a67bd541bb4515af24bcc4ad692dcf7.tar rpmdrake-13da6ea62a67bd541bb4515af24bcc4ad692dcf7.tar.gz rpmdrake-13da6ea62a67bd541bb4515af24bcc4ad692dcf7.tar.bz2 rpmdrake-13da6ea62a67bd541bb4515af24bcc4ad692dcf7.tar.xz rpmdrake-13da6ea62a67bd541bb4515af24bcc4ad692dcf7.zip |
(get_update_medias) split it out of get_pkgs()
-rw-r--r-- | Rpmdrake/pkg.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 142ac4c3..a4e7b96a 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -153,6 +153,11 @@ sub formatlistpkg { join("\n", map { s/^(\s)/ \1/mg; "- $_" } sort { uc($a) cmp 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) = @_; @@ -225,7 +230,7 @@ sub get_pkgs { my $urpm = open_urpmi_db(); my $_lock = urpm::lock::urpmi_db($urpm); - @update_medias = grep { !$_->{ignore} && $_->{update} } @{$urpm->{media}}; + @update_medias = get_update_medias($urpm); warn_about_media($w, $opts); |