summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-06-20 15:20:25 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-06-20 15:20:25 +0000
commit7a7699c41d5c5f70bc1b0a1f9d120e72dfc30698 (patch)
treef4449124fa53262a4a4890aea6e48a63410ae8a7
parent0f5539c70960451b4b2c68dec6861227aa743243 (diff)
downloadurpmi-7a7699c41d5c5f70bc1b0a1f9d120e72dfc30698.tar
urpmi-7a7699c41d5c5f70bc1b0a1f9d120e72dfc30698.tar.gz
urpmi-7a7699c41d5c5f70bc1b0a1f9d120e72dfc30698.tar.bz2
urpmi-7a7699c41d5c5f70bc1b0a1f9d120e72dfc30698.tar.xz
urpmi-7a7699c41d5c5f70bc1b0a1f9d120e72dfc30698.zip
Remove old rpm db log files when restarting one self
-rwxr-xr-xurpmi11
1 files changed, 8 insertions, 3 deletions
diff --git a/urpmi b/urpmi
index 9df0a6f4..8b3542cb 100755
--- a/urpmi
+++ b/urpmi
@@ -308,6 +308,14 @@ select STDOUT; $| = 1;
#- log is only for verbose runs.
$verbose > 0 or $urpm->{log} = sub {};
+if (exists $urpm->{options}{'priority-upgrade'} && $urpm->{options}{'priority-upgrade'} eq '') {
+ # we were run with --no-priority-upgrade (we were just restarted.)
+ # so, no need to update the media again
+ $auto_update = 0;
+ # also, clean up rpm db log files, because rpm might have been upgraded
+ unlink </var/lib/rpm/__db.00?> unless $root;
+}
+
unless ($env || $nolock) {
$urpm->exlock_rpm_db;
$urpm->shlock_urpmi_db;
@@ -331,9 +339,6 @@ my %config_hash = (
usedistrib => $usedistrib,
);
-if (exists $urpm->{options}{'priority-upgrade'} && $urpm->{options}{'priority-upgrade'} eq '') {
- $auto_update = 0;
-}
$root and $urpm->{options}{'priority-upgrade'} = '';
if ($auto_update && !$bug && !$env) {
#- For translators : there are several media here