aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gmail.com>2018-02-19 11:26:10 -0600
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2018-03-05 15:27:28 -0500
commit2b63b5e7f84303ff9268b1ecce31d9b8a56c5fc3 (patch)
treef7298737bbc911452efd51fb5c0030a53eeffbf0 /targets
parentfix minor whitespace damage (diff)
downloadcatalyst-2b63b5e7f84303ff9268b1ecce31d9b8a56c5fc3.tar.gz
catalyst-2b63b5e7f84303ff9268b1ecce31d9b8a56c5fc3.tar.bz2
catalyst-2b63b5e7f84303ff9268b1ecce31d9b8a56c5fc3.zip
kmerge.sh: allow kernel source upgrades w/ kerncache
Currently when kerncache is on and it detects any usable cache, it adds a package.provided entry so that no new kernel sources will be installed. This patch adds a check for newer kernel sources, so if newer sources are available then it won't create the package.provided entry.
Diffstat (limited to 'targets')
-rwxr-xr-xtargets/support/kmerge.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index ffa3c9e9..dfdb637c 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -221,15 +221,12 @@ then
rm -f ${clst_port_conf}/profile/package.provided
fi
- if [ ! -e ${clst_port_conf}/profile/package.provided ]
- then
- mkdir -p ${clst_port_conf}/profile
- echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
+ # Don't use package.provided if there's a pending up/downgrade
+ if [[ "$(portageq best_visible / ${clst_ksource})" == "${KERNELVERSION}" ]]; then
+ echo "No pending updates for ${clst_ksource}"
else
- if ( ! grep -q "^${KERNELVERSION}\$" ${clst_port_conf}/profile/package.provided )
- then
- echo "${KERNELVERSION}" >> ${clst_port_conf}/profile/package.provided
- fi
+ echo "Pending updates for ${clst_ksource}, removing package.provided"
+ rm ${clst_port_conf}/profile/package.provided
fi
[ -L /usr/src/linux ] && rm -f /usr/src/linux