* [RFC v2] package.bbclass: enable the use of package_qa_handle_error
@ 2012-07-03 0:40 Saul Wold
2012-07-03 13:55 ` Chris Larson
0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2012-07-03 0:40 UTC (permalink / raw)
To: openembedded-core
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)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/classes/package.bbclass | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0b98c6b..ff2ec96 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC v2] package.bbclass: enable the use of package_qa_handle_error
2012-07-03 0:40 [RFC v2] package.bbclass: enable the use of package_qa_handle_error Saul Wold
@ 2012-07-03 13:55 ` Chris Larson
2012-07-03 17:12 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Chris Larson @ 2012-07-03 13:55 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Mon, Jul 2, 2012 at 5:40 PM, Saul Wold <sgw@linux.intel.com> wrote:
> 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)
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> meta/classes/package.bbclass | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 0b98c6b..ff2ec96 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -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)
Hmm, I wonder if this is best, or if it should assemble a single
message with newlines separating the files. *thinks*
--
Christopher Larson
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC v2] package.bbclass: enable the use of package_qa_handle_error
2012-07-03 13:55 ` Chris Larson
@ 2012-07-03 17:12 ` Saul Wold
2012-07-03 19:04 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2012-07-03 17:12 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Chris Larson
On 07/03/2012 06:55 AM, Chris Larson wrote:
> On Mon, Jul 2, 2012 at 5:40 PM, Saul Wold<sgw@linux.intel.com> wrote:
>> 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)
>>
>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>> ---
>> meta/classes/package.bbclass | 11 ++++++++---
>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index 0b98c6b..ff2ec96 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -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)
>
> 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!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC v2] package.bbclass: enable the use of package_qa_handle_error
2012-07-03 17:12 ` Saul Wold
@ 2012-07-03 19:04 ` Khem Raj
2012-07-03 19:46 ` Chris Larson
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2012-07-03 19:04 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Cc: Chris Larson, Patches and discussions about the oe-core layer
-Khem
On Jul 3, 2012, at 10:12 AM, Saul Wold <sgw@linux.intel.com> wrote:
> On 07/03/2012 06:55 AM, Chris Larson wrote:
>> On Mon, Jul 2, 2012 at 5:40 PM, Saul Wold<sgw@linux.intel.com> wrote:
>>> 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)
>>>
>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>> ---
>>> meta/classes/package.bbclass | 11 ++++++++---
>>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>>> index 0b98c6b..ff2ec96 100644
>>> --- a/meta/classes/package.bbclass
>>> +++ b/meta/classes/package.bbclass
>>> @@ -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)
>>
>> 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.
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
>
> Could work either way, but I like the exaggerated count.
>
> Sau!
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC v2] package.bbclass: enable the use of package_qa_handle_error
2012-07-03 19:04 ` Khem Raj
@ 2012-07-03 19:46 ` Chris Larson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Larson @ 2012-07-03 19:46 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On Tue, Jul 3, 2012 at 12:04 PM, Khem Raj <raj.khem@gmail.com> wrote:
>
>
> -Khem
>
> On Jul 3, 2012, at 10:12 AM, Saul Wold <sgw@linux.intel.com> wrote:
>
>> On 07/03/2012 06:55 AM, Chris Larson wrote:
>>> On Mon, Jul 2, 2012 at 5:40 PM, Saul Wold<sgw@linux.intel.com> wrote:
>>>> 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)
>>>>
>>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>>> ---
>>>> meta/classes/package.bbclass | 11 ++++++++---
>>>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>>>> index 0b98c6b..ff2ec96 100644
>>>> --- a/meta/classes/package.bbclass
>>>> +++ b/meta/classes/package.bbclass
>>>> @@ -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)
>>>
>>> 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.
>
> 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
>
>>
>> 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.
--
Christopher Larson
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-03 19:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03 0:40 [RFC v2] package.bbclass: enable the use of package_qa_handle_error Saul Wold
2012-07-03 13:55 ` Chris Larson
2012-07-03 17:12 ` Saul Wold
2012-07-03 19:04 ` Khem Raj
2012-07-03 19:46 ` Chris Larson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox