From b773ad0ff90f500550fe45e0aecbba97e5d48122 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 22 Oct 2015 13:46:48 +0200 Subject: [PATCH] live base: Migrate yum's yumdb over to dnf As livecd-creator is still yum based, we only get yum's yumdb during live image composes. To work this around, this commit adds a %post script to fedora-live-base.ks to migrate yum's yumdb over to dnf. https://bugzilla.redhat.com/show_bug.cgi?id=1274319 --- fedora-live-base.ks | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fedora-live-base.ks b/fedora-live-base.ks index 0d38791..2a22a6d 100644 --- a/fedora-live-base.ks +++ b/fedora-live-base.ks @@ -275,6 +275,15 @@ chmod 755 /etc/rc.d/init.d/livesys-late # enable tmpfs for /tmp systemctl enable tmp.mount +# As livecd-creator is still yum based, we only get yum's yumdb during the +# image compose. Migrate this over to dnf so that dnf and PackageKit can keep +# track where packages came from. +if [ ! -d /var/lib/dnf ]; then + mkdir -p /var/lib/dnf + mv /var/lib/yum/yumdb /var/lib/dnf/ + rm -rf /var/lib/yum/ +fi + # make it so that we don't do writing to the overlay for things which # are just tmpdirs/caches # note https://bugzilla.redhat.com/show_bug.cgi?id=1135475