From 10854658f082575227acea7633218b0c221e07f9 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 14 Feb 2005 10:56:38 +0000 Subject: Patch by Michael Scherer (a bit reworked) to allow to use $ARCH, $RELEASE and $HOST in media URLs. --- urpm.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 3fe7523f..9a31d87d 100644 --- a/urpm.pm +++ b/urpm.pm @@ -680,6 +680,16 @@ sub add_medium { #- keep in mind the database has been modified and base files need to be updated. #- this will be done automatically by transfering modified flag from medium to global. $urpm->{log}(N("added medium %s", $name)); + + #- we need to reload the config, since some string substitutions may have occured + $urpm->write_config; + delete $urpm->{media}; + $urpm->read_config(nocheck_access => 1); + foreach (@{$urpm->{media}}) { + $_->{name} eq $name and $_->{modified} = 1; + } + $urpm->{modified} = 1; + $name; } -- cgit v1.2.1