commit 2459d8254be561f0167398e5d1e10ccb8a3f0cb8
Author: Kalev Lember <klember(a)redhat.com>
Date: Tue Oct 20 20:17:29 2015 +0200
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(-)
---
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