summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-14 10:56:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-14 10:56:38 +0000
commit10854658f082575227acea7633218b0c221e07f9 (patch)
tree606dd98a1afe7ac11a26d61b2781038271dc33f6 /urpm.pm
parent5bdd7824f0be68ee4e09504723ff6add2f8f74f2 (diff)
downloadurpmi-10854658f082575227acea7633218b0c221e07f9.tar
urpmi-10854658f082575227acea7633218b0c221e07f9.tar.gz
urpmi-10854658f082575227acea7633218b0c221e07f9.tar.bz2
urpmi-10854658f082575227acea7633218b0c221e07f9.tar.xz
urpmi-10854658f082575227acea7633218b0c221e07f9.zip
Patch by Michael Scherer (a bit reworked) to allow to use $ARCH, $RELEASE
and $HOST in media URLs.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm10
1 files changed, 10 insertions, 0 deletions
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;
}