summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Kinard <kumba@gentoo.org>2016-08-22 09:28:51 -0400
committerJoshua Kinard <kumba@gentoo.org>2016-08-22 09:33:20 -0400
commitc11d84573635b6c31966906e82f1ba4f380143ac (patch)
treef41ea5b76ec44d25bdc10fee3e9dedc04483e414 /eclass/kernel-2.eclass
parentprofiles/base/make.defaults: Set PHP_TARGETS default to php5-6 (diff)
downloadgentoo-c11d84573635b6c31966906e82f1ba4f380143ac.tar.gz
gentoo-c11d84573635b6c31966906e82f1ba4f380143ac.tar.bz2
gentoo-c11d84573635b6c31966906e82f1ba4f380143ac.zip
kernel-2.eclass: Add 'K_FROM_GIT' var to replace hardcoded reference to sys-kernel/git-sources.
This is to work around a possible bug in patch when attempting to patch kernel trees checked out from git that remove a symlink and replace it with a file of the same name. See Bug #507656. Signed-off-by: Joshua Kinard <kumba@gentoo.org> Acked-by: Mike Pagano <mpagano@gentoo.org>
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r--eclass/kernel-2.eclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 3ecd6c317973..6b4e8441ef63 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -49,6 +49,9 @@
# as a result the user cannot choose to apply those patches.
# K_EXP_GENPATCHES_LIST - A list of patches to pick from "experimental" to apply when
# the USE flag is unset and K_EXP_GENPATCHES_PULL is set.
+# K_FROM_GIT - If set, this variable signals that the kernel sources derives from a git tree and special
+# handling will be applied so that any patches that are applied will actually apply.
+#
# K_GENPATCHES_VER - The version of the genpatches tarball(s) to apply.
# A value of "5" would apply genpatches-2.6.12-5 to
# my-sources-2.6.12.ebuild
@@ -1090,7 +1093,7 @@ unipatch() {
# #
# https://bugs.gentoo.org/show_bug.cgi?id=507656 #
####################################################################
- if [[ ${PN} == "git-sources" ]] ; then
+ if [[ -n ${K_FROM_GIT} ]] ; then
if [[ ${KV_MAJOR} -gt 3 || ( ${KV_MAJOR} -eq 3 && ${KV_PATCH} -gt 15 ) &&
${RELEASETYPE} == -rc ]] ; then
ebegin "Applying ${i/*\//} (-p1)"