From e07cfce2f1118a2052f91f6f5839657a73fd5a23 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 19 Oct 2015 16:35:38 +0200 Subject: [PATCH] workstation: Include cached metadata for PackageKit Instead of taking the metadata from PackageKit-cached-metadata package as we were doing previously, copy it over directly during the compose from https://kojipkgs.fedoraproject.org/mash/ This makes it much less error prone as we always get the very latest metadata, and makes maintenance much simpler as we don't need to roll PackageKit-cached-metadata by hand. Users are also going to appreciate this because it makes post-GA updates smaller as they won't have to download updates for the PackageKit-cached-metadata subpackage each time PackageKit gets updated. --- fedora-live-workstation.ks | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/fedora-live-workstation.ks b/fedora-live-workstation.ks index 9038413..6857b86 100644 --- a/fedora-live-workstation.ks +++ b/fedora-live-workstation.ks @@ -12,6 +12,36 @@ part / --size 6144 # This is a huge file and things work ok without it rm -f /usr/share/icons/HighContrast/icon-theme.cache +# Copy initial metadata for PackageKit +PK_PREFIX=`mktemp -d` +mkdir -p $PK_PREFIX/etc/yum.repos.d +if [ -f /etc/yum.repos.d/fedora.repo ] ; then + cp /etc/yum.repos.d/fedora.repo $PK_PREFIX/etc/yum.repos.d/ + sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/mash/branched/$basearch/os/|' \ + $PK_PREFIX/etc/yum.repos.d/fedora.repo +fi +if [ -f /etc/yum.repos.d/fedora-updates.repo ] ; then + cp /etc/yum.repos.d/fedora-updates.repo $PK_PREFIX/etc/yum.repos.d/ + sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/mash/updates/f$releasever-updates/$basearch/|' \ + $PK_PREFIX/etc/yum.repos.d/fedora-updates.repo +fi +if [ -f /etc/yum.repos.d/fedora-updates-testing.repo ] ; then + cp /etc/yum.repos.d/fedora-updates-testing.repo $PK_PREFIX/etc/yum.repos.d/ + sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/mash/updates/f$releasever-updates-testing/$basearch/|' \ + $PK_PREFIX/etc/yum.repos.d/fedora-updates-testing.repo +fi +if [ -f /etc/yum.repos.d/fedora-rawhide.repo ] ; then + cp /etc/yum.repos.d/fedora-rawhide.repo $PK_PREFIX/etc/yum.repos.d/ + sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/mash/rawhide/$basearch/os/|' \ + $PK_PREFIX/etc/yum.repos.d/fedora-rawhide.repo +fi +rpm --root=$PK_PREFIX --initdb +DESTDIR=$PK_PREFIX /usr/libexec/packagekit-direct refresh +if [ -d /var/cache/PackageKit ] ; then + mv $PK_PREFIX/var/cache/PackageKit/* /var/cache/PackageKit/ +fi +rm -rf $PK_PREFIX + cat >> /etc/rc.d/init.d/livesys << EOF