summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-06 14:04:04 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-06 14:04:04 +0000
commit6ae04a8f731222975c0ae2df3c9a9e6bdafa773c (patch)
tree103a05158cf050440ba6c5d0b563cf39c338fa4a /urpm.pm
parentdd93cd18f3fce4ca8367cb8fb0be3927a95d0608 (diff)
downloadurpmi-6ae04a8f731222975c0ae2df3c9a9e6bdafa773c.tar
urpmi-6ae04a8f731222975c0ae2df3c9a9e6bdafa773c.tar.gz
urpmi-6ae04a8f731222975c0ae2df3c9a9e6bdafa773c.tar.bz2
urpmi-6ae04a8f731222975c0ae2df3c9a9e6bdafa773c.tar.xz
urpmi-6ae04a8f731222975c0ae2df3c9a9e6bdafa773c.zip
4.2-3mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/urpm.pm b/urpm.pm
index e7850b67..8adaadbf 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -663,6 +663,8 @@ sub configure {
local $SIG{INT} = $sig_handler;
local $SIG{QUIT} = $sig_handler;
local *RPMDB;
+
+ $db or $urpm->{fatal}(_"unable to open rpmdb");
open RPMDB, "| " . ($ENV{LD_LOADER} || '') . " gzip -9 >'$options{bug}/rpmdb.cz'";
$db->traverse(sub{
my ($p) = @_;
@@ -1802,6 +1804,7 @@ sub resolve_dependencies {
$db->parse_synthesis($options{rpmdb});
} else {
$db = URPM::DB::open($urpm->{root});
+ $db or $urpm->{fatal}(_"unable to open rpmdb");
}
my $sig_handler = sub { undef $db; exit 3 };
@@ -2218,6 +2221,8 @@ sub install {
my ($update, @l, %file2pkg) = (0);
local *F;
+ $db or $urpm->{fatal}(_"unable to open rpmdb");
+
foreach (@$remove) {
$trans->remove($_) or $urpm->{error}(_("unable to remove package %s", $_));
}
@@ -2296,6 +2301,8 @@ sub find_packages_to_remove {
my $db = URPM::DB::open($options{root});
my (@m, @notfound);
+ $db or $urpm->{fatal}(_"unable to open rpmdb");
+
if (!$options{matches}) {
foreach (@$l) {
my ($n, $found);