From 9b9fc8f102ad910401dfdf8d421b14ac09059771 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Oct 2007 11:59:09 +0000 Subject: - library: o urpm::media::add_distrib_media: add option "only_updates" for rpmdrake --- NEWS | 3 +++ urpm/media.pm | 4 ++++ 2 files changed, 7 insertions(+) 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( -- cgit v1.2.1