]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-yocto: Move PREFERRED_PROVIDER check to be generic
authorSaul Wold <sgw@linux.intel.com>
Mon, 26 Sep 2016 21:36:02 +0000 (14:36 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Sep 2016 09:15:54 +0000 (10:15 +0100)
This check ensures that when the PREFERRED_PROVIDER for virtual/kernel
changes, the previous instances gets removed correctly so when the new
instance installs files into the shared area there is not an overlap of
old and new.

[YOCTO #10278]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux/linux-yocto-dev.bb
meta/recipes-kernel/linux/linux-yocto.inc

index dbe58477f54efe482fe0639729ec361bd32472cb..9154bb7c3113610a83e6b172bfedfeb59460cf52 100644 (file)
@@ -14,15 +14,6 @@ require recipes-kernel/linux/linux-yocto.inc
 # provide this .inc to set specific revisions
 include recipes-kernel/linux/linux-yocto-dev-revisions.inc
 
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
-# by the use of AUTOREV SRCREVs, which are the default for this recipe.
-python () {
-    if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-dev":
-        d.delVar("BB_DONT_CACHE")
-        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-dev to enable it")
-}
-
 KBRANCH = "standard/base"
 KMETA = "kernel-meta"
 
index d979662a500b1d94b75fd78a4414a69da1ac6394..a5595abe8d29304080451d37fef3dc9347a2a86b 100644 (file)
@@ -8,6 +8,15 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
 
 INC_PR = "r4"
 
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
+# by the use of AUTOREV SRCREVs, which are the default for this recipe.
+python () {
+    if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != d.getVar("PN", True):
+        d.delVar("BB_DONT_CACHE")
+        raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN", True)))
+}
+
 DEPENDS += "xz-native bc-native"
 DEPENDS_append_aarch64 = " libgcc"
 KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"