aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-02-12 10:23:59 +0000
committerThierry Vignaud <tv@mandriva.org>2009-02-12 10:23:59 +0000
commit9310b50c2a3aac479d9dac7c9651f498456c6999 (patch)
tree0bcde462bf9303b06aef0e1034b7ec5f64d01988 /Rpmdrake
parent67313f697d25fbe284358859280078305e366270 (diff)
downloadrpmdrake-9310b50c2a3aac479d9dac7c9651f498456c6999.tar
rpmdrake-9310b50c2a3aac479d9dac7c9651f498456c6999.tar.gz
rpmdrake-9310b50c2a3aac479d9dac7c9651f498456c6999.tar.bz2
rpmdrake-9310b50c2a3aac479d9dac7c9651f498456c6999.tar.xz
rpmdrake-9310b50c2a3aac479d9dac7c9651f498456c6999.zip
(fast_open_urpmi_db) prevent crashing in URPM when using --env with relative paths
(eg: "unable to read synthesis file bug-envs/47305_full/rpmdb.cz") (I suspect some chdir() happens at a certain stage in urpmi or URPM)
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/open_db.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index e86ab17c..590be843 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -80,6 +80,8 @@ sub fast_open_urpmi_db() {
urpm::args::set_verbosity();
if ($::rpmdrake_options{env} && $::rpmdrake_options{env}[0]) {
$::env = $::rpmdrake_options{env}[0];
+ # prevent crashing in URPM.pm prevent when using --env:
+ $::env = "$ENV{PWD}/$::env" if $::env !~ m!^/!;
urpm::set_env($urpm, $::env);
}