]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging: Save out provider information into the sysroot
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Mar 2014 11:39:20 +0000 (11:39 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Mar 2014 10:21:06 +0000 (10:21 +0000)
This patch saves out provider information into the sysroot for all providers
except those in MULTI_PROVIDER_WHITELIST. This means that we will start seeing
warnings when two providers for the same thing are installed into the sysroot.

In the future those warnings can be turned into errors.

Partially addresses [YOCTO #4102]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/staging.bbclass

index d17a53ebefac5e1889a02ebbd3f50fb129f70865..c74cb99dfa9cff2b13d72210e95dff7d9a25d4a3 100644 (file)
@@ -93,6 +93,16 @@ python do_populate_sysroot () {
     bb.build.exec_func("sysroot_stage_all", d)
     for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
         bb.build.exec_func(f, d)
+    pn = d.getVar("PN", True)
+    multiprov = d.getVar("MULTI_PROVIDER_WHITELIST", True).split()
+    provdir = d.expand("${SYSROOT_DESTDIR}${base_prefix}/sysroot-providers/")
+    bb.utils.mkdirhier(provdir)
+    for p in d.getVar("PROVIDES", True).split():
+        if p in multiprov:
+            continue
+        p = p.replace("/", "_")
+        with open(provdir + p, "w") as f:
+            f.write(pn)
 }
 
 SSTATETASKS += "do_populate_sysroot"