summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-06 14:06:18 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-06 14:06:18 +0000
commitd6467c1c7b46d4ef0bdaa1c158483a4715020597 (patch)
tree9e06af0c6755ea0c0e498152655c37fbbd3345b0
parent6ae04a8f731222975c0ae2df3c9a9e6bdafa773c (diff)
downloadurpmi-d6467c1c7b46d4ef0bdaa1c158483a4715020597.tar
urpmi-d6467c1c7b46d4ef0bdaa1c158483a4715020597.tar.gz
urpmi-d6467c1c7b46d4ef0bdaa1c158483a4715020597.tar.bz2
urpmi-d6467c1c7b46d4ef0bdaa1c158483a4715020597.tar.xz
urpmi-d6467c1c7b46d4ef0bdaa1c158483a4715020597.zip
tiny fix.
-rw-r--r--urpm.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 8adaadbf..1280ceb3 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2217,12 +2217,13 @@ sub install_logger {
sub install {
my ($urpm, $remove, $install, $upgrade, %options) = @_;
my $db = URPM::DB::open($urpm->{root}, !$options{test}); #- open in read/write mode unless testing installation.
+
+ $db or $urpm->{fatal}(_"unable to open rpmdb");
+
my $trans = $db->create_transaction($urpm->{root});
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", $_));
}