package.bbclass: enable the use of package_qa_handle_error
RFC v2 1/1 package.bbclass: enable the use of package_qa_handle_error
This will allow the reporting of these errors as either WARNINGs (default) or ERRORs if installed_vs_shipped is added to the ERROR_QA of the policy file (such as a <distro_name>.conf file.
V2: found the code I had intended to send instead of that other junk,
was just not watching what I pushed on that one, sorry. (this is edit in no in the actual commit message)
--- meta/classes/package.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
meta/classes/package.bbclass +8 -3
@@ -988,9 +988,14 @@ 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" + skip = (d.getVar('INSANE_SKIP_' + pn, True) or "").split() + if "installed_vs_shipped" in skip: + bb.note("Package %s skipping QA tests: installed_vs_shipped" % pn) + else: + package_qa_handle_error("installed_vs_shipped", msg, d) + for f in unshipped: + package_qa_handle_error("installed_vs_shipped", " " + f, d) bb.build.exec_func("package_name_hook", d)
Signature · 1 line
1.7.10.4
Quoted 22 lines · Saul Wold
This will allow the reporting of these errors as either WARNINGs (default) or ERRORs if
installed_vs_shippedis added to theERROR_QAof the policy file (such as a <distro_name>.conf file.V2: found the code I had intended to send instead of that other junk,
was just not watching what I pushed on that one, sorry. (this is edit in no in the actual commit message)Signed-off-by Saul Wold <[email protected]>--- meta/classes/package.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)meta/classes/package.bbclass +0
-1@@ -988,9 +988,14 @@ 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)
meta/classes/package.bbclass python populate_packages () { · line 998
Quoted 10 lines
meta/classes/package.bbclass +8
-2- for f in unshipped: - bb.warn(" " + f) + msg = pn + ": Files/directories were installed but not shipped" + skip = (d.getVar('INSANE_SKIP_' + pn, True) or "").split() + if "installed_vs_shipped" in skip: + bb.note("Package %s skipping QA tests: installed_vs_shipped" % pn) + else: + package_qa_handle_error("installed_vs_shipped", msg, d) + for f in unshipped: + package_qa_handle_error("installed_vs_shipped", " " + f, d)
Hmm, I wonder if this is best, or if it should assemble a single message with newlines separating the files. *thinks*
Signature · 1 line
Christopher Larson
Quoted 21 lines · Chris Larson
Quoted 20 lines · Saul Wold
This will allow the reporting of these errors as either WARNINGs (default) or ERRORs if
installed_vs_shippedis added to theERROR_QAof the policy file (such as a<distro_name>.conf file.V2: found the code I had intended to send instead of that other junk,
was just not watching what I pushed on that one, sorry. (this is edit in no in the actual commit message)Signed-off-by Saul Wold<[email protected]>--- meta/classes/package.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)meta/classes/package.bbclass +0
-0@@ -988,9 +988,14 @@ python populate_packages () { unshipped.append(path)
Quoted 15 lines
meta/classes/package.bbclass python populate_packages () { · line 998
Quoted 12 lines
meta/classes/package.bbclass +8
-3if 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" + skip = (d.getVar('INSANE_SKIP_' + pn, True) or "").split() + if "installed_vs_shipped" in skip: + bb.note("Package %s skipping QA tests: installed_vs_shipped" % pn) + else: + package_qa_handle_error("installed_vs_shipped", msg, d) + for f in unshipped: + package_qa_handle_error("installed_vs_shipped", " " + f, d)Hmm, I wonder if this is best, or if it should assemble a single message with newlines separating the files. *thinks*
So that would cause only 1 ERROR or WARNING count, vs N ERRORs or WARNIGS in the final count for every file that is listed, I think it's good to have the larger count it signal's something went wrong if that count increases greatly when a recipe is changed.
Could work either way, but I like the exaggerated count.
Sau!
-Khem
Quoted 38 lines · Saul Wold
Quoted 21 lines · Chris Larson
Quoted 20 lines · Saul Wold
This will allow the reporting of these errors as either WARNINGs (default) or ERRORs if
installed_vs_shippedis added to theERROR_QAof the policy file (such as a<distro_name>.conf file.V2: found the code I had intended to send instead of that other junk,
was just not watching what I pushed on that one, sorry. (this is edit in no in the actual commit message)Signed-off-by Saul Wold<[email protected]>--- meta/classes/package.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)meta/classes/package.bbclass +0
-0@@ -988,9 +988,14 @@ python populate_packages () { unshipped.append(path)Quoted 15 lines
meta/classes/package.bbclass python populate_packages () { · line 998
Quoted 12 lines
meta/classes/package.bbclass +8
-3if 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" + skip = (d.getVar('INSANE_SKIP_' + pn, True) or "").split() + if "installed_vs_shipped" in skip: + bb.note("Package %s skipping QA tests: installed_vs_shipped" % pn) + else: + package_qa_handle_error("installed_vs_shipped", msg, d) + for f in unshipped: + package_qa_handle_error("installed_vs_shipped", " " + f, d)Hmm, I wonder if this is best, or if it should assemble a single message with newlines separating the files. *thinks*
Quoted 1 line
So that would cause only 1 ERROR or WARNING count, vs N ERRORs or WARNIGS in the final count for every file that is listed, I think it's good to have the larger count it signal's something went wrong if that count increases greatly when a recipe is changed.
If its flagged as error then count really doesn't matter and if it is warning then user doesnt care But reporting all together may be better
Quoted 9 lines
Could work either way, but I like the exaggerated count.
Sau!
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 44 lines · Khem Raj
-Khem
Quoted 38 lines · Saul Wold
Quoted 36 lines · Chris Larson
Quoted 22 lines · Saul Wold
This will allow the reporting of these errors as either WARNINGs (default) or ERRORs if
installed_vs_shippedis added to theERROR_QAof the policy file (such as a<distro_name>.conf file.V2: found the code I had intended to send instead of that other junk,
was just not watching what I pushed on that one, sorry. (this is edit in no in the actual commit message)Signed-off-by Saul Wold<[email protected]>--- meta/classes/package.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)meta/classes/package.bbclass +0
-1@@ -988,9 +988,14 @@ 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)meta/classes/package.bbclass python populate_packages () { · line 998
Quoted 10 lines
meta/classes/package.bbclass +8
-2- for f in unshipped: - bb.warn(" " + f) + msg = pn + ": Files/directories were installed but not shipped" + skip = (d.getVar('INSANE_SKIP_' + pn, True) or "").split() + if "installed_vs_shipped" in skip: + bb.note("Package %s skipping QA tests: installed_vs_shipped" % pn) + else: + package_qa_handle_error("installed_vs_shipped", msg, d) + for f in unshipped: + package_qa_handle_error("installed_vs_shipped", " " + f, d)Hmm, I wonder if this is best, or if it should assemble a single message with newlines separating the files. *thinks*
Quoted 7 lines
Quoted 1 line
So that would cause only 1 ERROR or WARNING count, vs N ERRORs or WARNIGS in the final count for every file that is listed, I think it's good to have the larger count it signal's something went wrong if that count increases greatly when a recipe is changed.
If its flagged as error then count really doesn't matter and if it is warning then user doesnt care But reporting all together may be better
Quoted 2 lines
Could work either way, but I like the exaggerated count.
This is true, but conceptually it's a single message. Further, those messages are tightly bound to the previous message in the multiple message case, which means there's a particular context involved which isn't reflected in the messages. They can and will be intertwined with other messages from other tasks. That isn't the case if it's just one.
Signature · 1 line
Christopher Larson