Skip to contentSkip to conversation

package.bbclass: enable the use of ERROR_QA

RFC Superseded Saul Wold 2 participants 3 messages Jul 2, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

RFC 1/1 package.bbclass: enable the use of ERROR_QA

This patch allows the use of ERROR_QA to give policy control to distros for the Installed and not shipped error in packages. installed_vs_shipped can be set in the distro config file for ERROR_QA.

---
 meta/classes/package.bbclass |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
meta/classes/package.bbclass +13 -4
index 10c2f0a..231b01b 100644
@@ -988,10 +988,19 @@ python populate_packages () {
 				unshipped.append(path)
 
 	if unshipped != []:
-		bb.warn("For recipe %s, the following files/directories were installed but not shipped in any package:" % pn)
-		for f in unshipped:
-			bb.warn("  " + f)
-
+		msg = pn + ": Files/directories were installed but not shipped" 
+		if "installed_vs_shipped" in = (d.getVar('INSANE_SKIP_' + pn, True) or "").split()
+			bb.note("Package %s skipping Packging installed vs shipped QA test" % pn) 
+			continue
+		if "installed_vs_shipped" in (d.getVar("ERROR_QA", True) or "").split():
+			package_qa_handle_error("installed_vs_shipped", msg, d)
+			for f in unshipped:
+				package_qa_handle_error("installed_vs_shipped", "  " + f, d)
+		else:
+			bb.warn("For recipe %s, the following files/directories were installed but
+			for f in unshipped:
+				bb.warn("  " + f)
+ 
 	bb.build.exec_func("package_name_hook", d)
 
 	for pkg in package_list:
Signature · 1 line
1.7.10.4
#1 lore raw

meta/classes/package.bbclass python populate_packages () { · line 994

Quoted 3 lines · Saul Wold
meta/classes/package.bbclass +3 -0
+		if "installed_vs_shipped" in = (d.getVar('INSANE_SKIP_' + pn, True) or "").split()
+			bb.note("Package %s skipping Packging installed vs shipped QA test" % pn) 
+			continue

Does that actually compile? It doesn't look entirely like valid python to me.

p.

author
#2 lore raw
Quoted 8 lines · Phil Blundell

meta/classes/package.bbclass python populate_packages () { · line 994

Quoted 3 lines · Saul Wold
meta/classes/package.bbclass +3 -0
+		if "installed_vs_shipped" in = (d.getVar('INSANE_SKIP_' + pn, True) or "").split()
+			bb.note("Package %s skipping Packging installed vs shipped QA test" % pn)
+			continue

Does that actually compile? It doesn't look entirely like valid python to me.

Apparently not, I am really not sure what I tested this, but I did test something that gave me the messages I wanted. I am going back to my code and well, I feel stupid right now.

Sau!

Quoted 10 lines

p.

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core