From 2459d8254be561f0167398e5d1e10ccb8a3f0cb8 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 20 Oct 2015 20:17:29 +0200 Subject: [PATCH] Move packagekit-cached-metadata.ks to snippets/ ... and make it a top-level script wrapped in %post ... %end. --- fedora-live-kde-base.ks | 3 +-- fedora-live-workstation.ks | 3 +-- .../packagekit-cached-metadata.ks | 6 +++++- 3 files changed, 7 insertions(+), 5 deletions(-) rename fedora-packagekit-cached-metadata.ks => snippets/packagekit-cached-metadata.ks (96%) diff --git a/fedora-live-kde-base.ks b/fedora-live-kde-base.ks index 1d5ed5c..3e1d26a 100644 --- a/fedora-live-kde-base.ks +++ b/fedora-live-kde-base.ks @@ -4,6 +4,7 @@ %include fedora-live-base.ks %include fedora-kde-packages.ks +%include snippets/packagekit-cached-metadata.ks %post @@ -19,8 +20,6 @@ cat > /root/.config/gtk-3.0/settings.ini << EOF gtk-theme-name = Adwaita EOF -%include fedora-packagekit-cached-metadata.ks - # add initscript cat >> /etc/rc.d/init.d/livesys << EOF diff --git a/fedora-live-workstation.ks b/fedora-live-workstation.ks index cc8ef57..376ee72 100644 --- a/fedora-live-workstation.ks +++ b/fedora-live-workstation.ks @@ -4,6 +4,7 @@ %include fedora-live-base.ks %include fedora-workstation-packages.ks +%include snippets/packagekit-cached-metadata.ks part / --size 6144 @@ -12,8 +13,6 @@ part / --size 6144 # This is a huge file and things work ok without it rm -f /usr/share/icons/HighContrast/icon-theme.cache -%include fedora-packagekit-cached-metadata.ks - cat >> /etc/rc.d/init.d/livesys << EOF diff --git a/fedora-packagekit-cached-metadata.ks b/snippets/packagekit-cached-metadata.ks similarity index 96% rename from fedora-packagekit-cached-metadata.ks rename to snippets/packagekit-cached-metadata.ks index d2ef0f1..140d5e5 100644 --- a/fedora-packagekit-cached-metadata.ks +++ b/snippets/packagekit-cached-metadata.ks @@ -1,4 +1,7 @@ -# Copy initial metadata for PackageKit +# %post script to include initial metadata for PackageKit + +%post + PK_PREFIX=`mktemp -d` mkdir -p $PK_PREFIX/etc/yum.repos.d if [ -f /etc/yum.repos.d/fedora.repo ] ; then @@ -28,3 +31,4 @@ if [ -d /var/cache/PackageKit ] ; then fi rm -rf $PK_PREFIX +%end