summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-18 14:45:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-18 14:45:12 +0000
commitb2acbfd301f16263d7d7b2a68042b24ff0209596 (patch)
tree47bc4182644c9149df239cfb9fc4c1498d22ee29 /urpm/media.pm
parente2d226d49bb3879c813caa5eca5a028f06a2811d (diff)
downloadurpmi-b2acbfd301f16263d7d7b2a68042b24ff0209596.tar
urpmi-b2acbfd301f16263d7d7b2a68042b24ff0209596.tar.gz
urpmi-b2acbfd301f16263d7d7b2a68042b24ff0209596.tar.bz2
urpmi-b2acbfd301f16263d7d7b2a68042b24ff0209596.tar.xz
urpmi-b2acbfd301f16263d7d7b2a68042b24ff0209596.zip
- urpmi.addmedia
o fix reconfig.urpmi use
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index ee8e790d..601f1070 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -919,7 +919,7 @@ sub may_reconfig_urpmi {
urpm::download::sync($urpm, $medium, [ reduce_pathname("$medium->{url}/reconfig.urpmi") ], quiet => 1);
}
if (-s $f) {
- reconfig_urpmi($urpm, $f, $medium->{name});
+ reconfig_urpmi($urpm, $f, $medium);
}
unlink $f if !file_from_local_url($medium->{url});
}
@@ -935,10 +935,10 @@ sub may_reconfig_urpmi {
#- # this is an urpmi reconfiguration file
#- /cooker /cooker/$ARCH
sub reconfig_urpmi {
- my ($urpm, $rfile, $name) = @_;
+ my ($urpm, $rfile, $medium) = @_;
-r $rfile or return;
- $urpm->{log}(N("reconfiguring urpmi for media \"%s\"", $name));
+ $urpm->{log}(N("reconfiguring urpmi for media \"%s\"", $medium->{name}));
my ($magic, @lines) = cat_($rfile);
#- the first line of reconfig.urpmi must be magic, to be sure it's not an error file
@@ -956,7 +956,6 @@ sub reconfig_urpmi {
my $reconfigured = 0;
my @reconfigurable = qw(url with_hdlist media_info_dir);
- my $medium = name2medium($urpm, $name) or return;
my %orig = %$medium;
URLS:
@@ -984,7 +983,7 @@ sub reconfig_urpmi {
if ($reconfigured) {
$urpm->{log}(N("reconfiguration done"));
- write_config($urpm);
+ $urpm->{modified} = 1;
}
$reconfigured;
}