[oe-commits] [openembedded-core] 02/02: linux-yocto: Move PREFERRED_PROVIDER check to be generic

git at git.openembedded.org git at git.openembedded.org
Tue Sep 27 12:26:57 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 7dc757b1038680debb404a43c939ce49a6240c70
Author: Saul Wold <sgw at linux.intel.com>
AuthorDate: Mon Sep 26 14:36:02 2016 -0700

    linux-yocto: Move PREFERRED_PROVIDER check to be generic
    
    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 at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-kernel/linux/linux-yocto-dev.bb | 9 ---------
 meta/recipes-kernel/linux/linux-yocto.inc    | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index dbe5847..9154bb7 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -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"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index d979662..a5595ab 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -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}"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list