aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/open_db.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index 7b6cd896..70c5d2df 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -54,7 +54,14 @@ sub open_rpm_db {
}
URPM::DB::open($dblocation) or die "Couldn't open RPM DB";
} else {
- URPM::DB::open($::rpmdrake_options{'rpm-root'}[0]) or die "Couldn't open RPM DB ($::rpmdrake_options{'rpm-root'}[0])";
+ my $db;
+ if ($::env) {
+ $db = new URPM;
+ $db->parse_synthesis("$::env/rpmdb.cz");
+ } else {
+ $db = URPM::DB::open($::env || $::rpmdrake_options{'rpm-root'}[0]);
+ }
+ $db or die "Couldn't open RPM DB (" . ($::env ? "$::env/rpmdb.cz" : $::rpmdrake_options{'rpm-root'}[0]) . ")";
}
}