summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-09 17:20:19 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-09 17:20:19 +0000
commit66e5f23ab760cc334c1e8efc9aad9a72d7de1235 (patch)
treecf350d2f97bd83b5252f0228d3789befc9326d5d /urpmi
parent349001f77115538579db7d1b2f7569f4da09b7ec (diff)
downloadurpmi-66e5f23ab760cc334c1e8efc9aad9a72d7de1235.tar
urpmi-66e5f23ab760cc334c1e8efc9aad9a72d7de1235.tar.gz
urpmi-66e5f23ab760cc334c1e8efc9aad9a72d7de1235.tar.bz2
urpmi-66e5f23ab760cc334c1e8efc9aad9a72d7de1235.tar.xz
urpmi-66e5f23ab760cc334c1e8efc9aad9a72d7de1235.zip
(set_env) extract it so that rpmdrake can support the --env option
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi15
1 files changed, 1 insertions, 14 deletions
diff --git a/urpmi b/urpmi
index 200a3251..f6e34ff4 100755
--- a/urpmi
+++ b/urpmi
@@ -261,20 +261,7 @@ if ($bug) {
}
if ($env) {
- -d $env or $urpm->{fatal}(8, N("Environment directory %s does not exist", $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->{configs_dir} = "$env/media.d";
- $urpm->{skiplist} = "$env/skip.list";
- $urpm->{instlist} = "$env/inst.list";
- $urpm->{prefer_list} = "$env/prefer.list";
- $urpm->{prefer_vendor_list} = "$env/prefer.vendor.list";
- $urpm->{statedir} = $env;
+ urpm::set_env($urpm, $env);
} else {
if ($< != 0 && !$options{debug__do_not_install}) {
#- need to be root if binary rpms are to be installed