summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/sys.pm')
-rw-r--r--urpm/sys.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index cf32d42c..8d671ec3 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -108,6 +108,15 @@ sub _expand_symlink {
$pdir;
}
+sub may_clean_rpmdb_shared_regions {
+ my ($urpm, $test) = @_;
+
+ if ($urpm->{root} && !$test || $urpm->{tune_rpm}{private}) {
+ $urpm->{root} && $urpm->{debug} and $urpm->{debug}("workaround bug in rpmlib by removing /var/lib/rpm/__db*");
+ clean_rpmdb_shared_regions($urpm->{root});
+ }
+}
+
sub clean_rpmdb_shared_regions {
my ($prefix) = @_;
unlink glob("$prefix/var/lib/rpm/__db.*");