summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--urpm/media.pm4
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 648bd272..4bb58c66 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- library:
+ o urpm::media::add_distrib_media: add option "only_updates" for rpmdrake
+
Version 4.10.13 - 3 October 2007, by Pascal "Pixel" Rigaux
- urpmi
diff --git a/urpm/media.pm b/urpm/media.pm
index 3ff146f1..37719335 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -713,6 +713,7 @@ sub add_medium {
#- - initial_number : when adding several numbered media, start with this number
#- - probe_with : force use of synthesis/hdlist/rpms instead of using both synthesis&hdlist
#- - ask_media : callback to know whether each media should be added
+#- - only_updates : only add "update" media (used by rpmdrake)
#- other options are passed to add_medium(): ignore, nolock, virtual
sub add_distrib_media {
my ($urpm, $name, $url, %options) = @_;
@@ -775,6 +776,9 @@ sub add_distrib_media {
}
my $is_update_media = $distribconf->getvalue($media, 'updates_for');
+ if ($options{only_updates}) {
+ $is_update_media or next;
+ }
my $use_copied_hdlist = $urpm->{options}{use_copied_hdlist} || $distribconf->getvalue($media, 'use_copied_hdlist');
my $with_hdlist = $use_copied_hdlist && offset_pathname(