summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-23 13:55:06 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-23 13:55:06 +0000
commitfce61a8048ce5eec6e00da0c8c9dc86a57b29820 (patch)
tree95d812917aa6ed03df6eeb5f6d2b4e808f890998
parentb9105c97f62eccf24da26fe50657cc432058d46e (diff)
downloadurpmi-fce61a8048ce5eec6e00da0c8c9dc86a57b29820.tar
urpmi-fce61a8048ce5eec6e00da0c8c9dc86a57b29820.tar.gz
urpmi-fce61a8048ce5eec6e00da0c8c9dc86a57b29820.tar.bz2
urpmi-fce61a8048ce5eec6e00da0c8c9dc86a57b29820.tar.xz
urpmi-fce61a8048ce5eec6e00da0c8c9dc86a57b29820.zip
New urpmi.recover option: --list-safe
-rw-r--r--urpm/args.pm1
-rw-r--r--urpmi.recover6
2 files changed, 6 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index fa6f1d83..9a1c7e81 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -319,6 +319,7 @@ my %options_spec = (
'urpmi.recover' => {
'list=s' => \$::listdate,
'list-all' => sub { $::listdate = -1 },
+ 'list-safe' => sub { $::listdate = 'checkpoint' },
checkpoint => \$::do_checkpoint,
'rollback=s' => \$::rollback,
noclean => \$::noclean,
diff --git a/urpmi.recover b/urpmi.recover
index 2fdec09f..203ad0bf 100644
--- a/urpmi.recover
+++ b/urpmi.recover
@@ -35,6 +35,7 @@ usage:
") . N(" --noclean - don't clean repackage directory on checkpoint
") . N(" --list - list transactions since provided date/duration argument
") . N(" --list-all - list all transactions in rpmdb (long)
+") . N(" --list-safe - list transactions since checkpoint
") . N(" --rollback - rollback until specified date,
or rollback the specified number of transactions
") . N(" --disable - turn off repackaging
@@ -91,7 +92,10 @@ $disable && ($listdate || $rollback || $do_checkpoint)
if ($listdate) {
my $listtime = -1;
- if ($listdate ne -1) {
+ if ($listdate eq 'checkpoint') {
+ URPM::read_config_files();
+ $listtime = URPM::expand("%_unsafe_rollbacks");
+ } elsif ($listdate ne -1) {
#- convert to timestamp
$listtime = date_to_tid($listdate);
}