summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
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;
}