diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-17 15:26:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-17 15:26:01 +0000 |
commit | 435d92f61744e346fe549006f39aef606333c7e7 (patch) | |
tree | f1eb230a4062d13a1d3f4bddf54f77aada86e6e7 | |
parent | 18aac0fd6bb8d73f1219304af48c8e52ec998cde (diff) | |
download | urpmi-435d92f61744e346fe549006f39aef606333c7e7.tar urpmi-435d92f61744e346fe549006f39aef606333c7e7.tar.gz urpmi-435d92f61744e346fe549006f39aef606333c7e7.tar.bz2 urpmi-435d92f61744e346fe549006f39aef606333c7e7.tar.xz urpmi-435d92f61744e346fe549006f39aef606333c7e7.zip |
fix using urpmi --env where the media are virtual (by removing "virtual" from urpmi.cfg)
-rwxr-xr-x | urpmi | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -25,7 +25,7 @@ use urpm::args; use urpm::msg; use urpm::media; use urpm::select; -use urpm::util qw(untaint difference2 member partition); +use urpm::util qw(untaint difference2 member partition cat_); use urpm::main_loop; #URPM::setVerbosity(7); @@ -249,6 +249,10 @@ if ($env) { print N("using specific environment on %s\n", $env); #- setting new environment. $urpm->{config} = "$env/urpmi.cfg"; + if (cat_($urpm->{config}) =~ /^\s*virtual\s*$/m) { + print "dropping virtual from $urpm->{config}\n"; + system(q(perl -pi -e 's/^\s*virtual\s*$//' ) . $urpm->{config}); + } $urpm->{skiplist} = "$env/skip.list"; $urpm->{instlist} = "$env/inst.list"; $urpm->{prefer_list} = "$env/prefer.list"; |