From adf6568670db98636f981cdd1b258ae00ab5cb2d Mon Sep 17 00:00:00 2001 From: icequbes1 <71958531+icequbes1@users.noreply.github.com> Date: Wed, 28 Oct 2020 06:21:20 -0700 Subject: [PATCH] Overwrite .rpmdb for debian updatevm Resolves issue where the dom0 rpm database does not get used on successive calls to qubes-dom0-update for debian updatevms. Also resolves "cannot remove .rpmdbold.####" occurrences. qubesos/qubes-issues#6124 --- package-managers/qubes-download-dom0-updates.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package-managers/qubes-download-dom0-updates.sh b/package-managers/qubes-download-dom0-updates.sh index a85b28f..1bb20e6 100755 --- a/package-managers/qubes-download-dom0-updates.sh +++ b/package-managers/qubes-download-dom0-updates.sh @@ -76,7 +76,8 @@ if [ -e /etc/debian_version ]; then # Default rpm configuration on Debian uses ~/.rpmdb for rpm database (as # rpm isn't native package manager there) mkdir -p "$DOM0_UPDATES_DIR$HOME" - ln -nsf "$DOM0_UPDATES_DIR/var/lib/rpm" "$DOM0_UPDATES_DIR$HOME/.rpmdb" + rm -rf "$DOM0_UPDATES_DIR$HOME/.rpmdb" + cp -r "$DOM0_UPDATES_DIR/var/lib/rpm" "$DOM0_UPDATES_DIR$HOME/.rpmdb" fi # Rebuild rpm database in case of different rpm version rm -f $DOM0_UPDATES_DIR/var/lib/rpm/__*