summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-06-14 10:11:07 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-06-14 10:11:07 +0000
commitb8b668d4eaa2b4a725ed8b58e24a95d4ab9c4658 (patch)
tree6edf43f2d02191e998abd09e9e9ebc988f050c48
parentf4be28a0036970f34bd3f89031dbbe69f9b50a95 (diff)
downloadurpmi-b8b668d4eaa2b4a725ed8b58e24a95d4ab9c4658.tar
urpmi-b8b668d4eaa2b4a725ed8b58e24a95d4ab9c4658.tar.gz
urpmi-b8b668d4eaa2b4a725ed8b58e24a95d4ab9c4658.tar.bz2
urpmi-b8b668d4eaa2b4a725ed8b58e24a95d4ab9c4658.tar.xz
urpmi-b8b668d4eaa2b4a725ed8b58e24a95d4ab9c4658.zip
Check if we can open the rpmdb in urpmi.recover
-rw-r--r--urpmi.recover4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpmi.recover b/urpmi.recover
index 203ad0bf..55553810 100644
--- a/urpmi.recover
+++ b/urpmi.recover
@@ -101,7 +101,7 @@ if ($listdate) {
}
my %tids;
- my $db = URPM::DB::open();
+ my $db = URPM::DB::open() or die "Can't open RPM DB\n";
$db->traverse(sub {
my ($p) = @_;
my $tid = $p->installtid();
@@ -173,7 +173,7 @@ if ($rollback) {
#- $rollback contains a number of transactions to roll back
#- get a date from there
my %tids;
- my $db = URPM::DB::open();
+ my $db = URPM::DB::open() or die "Can't open RPM DB\n";
$db->traverse(sub { ++$tids{ $_[0]->installtid() } });
my @tids = sort { $b <=> $a } keys %tids;
$tid = $tids[$rollback - 1];