summaryrefslogtreecommitdiff
path: root/poky/meta/classes/utils.bbclass
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2020-05-26 20:25:03 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2020-05-26 20:25:03 +0300
commit35a774200999ac2fca48693c1c169bf99d2f63ea (patch)
tree0b2f65ce3a90f41d1c2542d0fd20b1604fd83fe5 /poky/meta/classes/utils.bbclass
parent497a23ef6661ad6ca7b75009e48a592c1620d46c (diff)
downloadopenbmc-2.8.0.tar.xz
reset upstream subtrees to HEAD2.8.0-rc12.8.0
Reset the following subtrees on HEAD: poky: ed3bdd7fbc(dunfell) meta-raspberrypi: 8066fac91d(dunfell) meta-security: d83f7cb0c9(dunfell) meta-openembedded: e413c1ef62(dunfell) Change-Id: Ifd3228663b08911c890d7631310294cccb3dd232 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/classes/utils.bbclass')
-rw-r--r--poky/meta/classes/utils.bbclass19
1 files changed, 19 insertions, 0 deletions
diff --git a/poky/meta/classes/utils.bbclass b/poky/meta/classes/utils.bbclass
index 120bcc64a6..cd3d05709e 100644
--- a/poky/meta/classes/utils.bbclass
+++ b/poky/meta/classes/utils.bbclass
@@ -1,3 +1,22 @@
+def machine_paths(d):
+ """List any existing machine specific filespath directories"""
+ machine = d.getVar("MACHINE")
+ filespathpkg = d.getVar("FILESPATHPKG").split(":")
+ for basepath in d.getVar("FILESPATHBASE").split(":"):
+ for pkgpath in filespathpkg:
+ machinepath = os.path.join(basepath, pkgpath, machine)
+ if os.path.isdir(machinepath):
+ yield machinepath
+
+def is_machine_specific(d):
+ """Determine whether the current recipe is machine specific"""
+ machinepaths = set(machine_paths(d))
+ srcuri = d.getVar("SRC_URI").split()
+ for url in srcuri:
+ fetcher = bb.fetch2.Fetch([srcuri], d)
+ if url.startswith("file://"):
+ if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths):
+ return True
oe_soinstall() {
# Purpose: Install shared library file and