* [v2][PATCH] cve-check: print warning if file is missing
@ 2020-07-27 2:52 akuster
2020-07-27 9:39 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: akuster @ 2020-07-27 2:52 UTC (permalink / raw)
To: openembedded-core
If the "tmp/cve_check" file was not create as in the case for -c populate_sdk, just print a
warning instead of dumping a trace back
---
v2] lets include the missing part of the patch
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta/classes/cve-check.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 0889e7544aa..b16da9890af 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -55,6 +55,10 @@ python cve_save_summary_handler () {
cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
+ if not os.path.isfile(cve_tmp_file):
+ bb.warn("File Not found: %s" % cve_tmp_file)
+ return
+
cve_summary_name = d.getVar("CVE_CHECK_SUMMARY_FILE_NAME")
cvelogpath = d.getVar("CVE_CHECK_SUMMARY_DIR")
bb.utils.mkdirhier(cvelogpath)
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [v2][PATCH] cve-check: print warning if file is missing
2020-07-27 2:52 [v2][PATCH] cve-check: print warning if file is missing akuster
@ 2020-07-27 9:39 ` Richard Purdie
2020-07-27 13:57 ` akuster
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-07-27 9:39 UTC (permalink / raw)
To: akuster, openembedded-core
On Sun, 2020-07-26 at 19:52 -0700, akuster wrote:
> If the "tmp/cve_check" file was not create as in the case for -c
> populate_sdk, just print a
> warning instead of dumping a trace back
>
> ---
> v2] lets include the missing part of the patch
>
> Signed-off-by: Armin Kuster <akuster808@gmail.com>
> ---
> meta/classes/cve-check.bbclass | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-
> check.bbclass
> index 0889e7544aa..b16da9890af 100644
> --- a/meta/classes/cve-check.bbclass
> +++ b/meta/classes/cve-check.bbclass
> @@ -55,6 +55,10 @@ python cve_save_summary_handler () {
>
> cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
>
> + if not os.path.isfile(cve_tmp_file):
> + bb.warn("File Not found: %s" % cve_tmp_file)
> + return
> +
A warning is something the user really needs to fix or take some action
about. Is this a warning?
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [v2][PATCH] cve-check: print warning if file is missing
2020-07-27 9:39 ` [OE-core] " Richard Purdie
@ 2020-07-27 13:57 ` akuster
2020-07-27 14:47 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: akuster @ 2020-07-27 13:57 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
On 7/27/20 2:39 AM, Richard Purdie wrote:
> On Sun, 2020-07-26 at 19:52 -0700, akuster wrote:
>> If the "tmp/cve_check" file was not create as in the case for -c
>> populate_sdk, just print a
>> warning instead of dumping a trace back
>>
>> ---
>> v2] lets include the missing part of the patch
>>
>> Signed-off-by: Armin Kuster <akuster808@gmail.com>
>> ---
>> meta/classes/cve-check.bbclass | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-
>> check.bbclass
>> index 0889e7544aa..b16da9890af 100644
>> --- a/meta/classes/cve-check.bbclass
>> +++ b/meta/classes/cve-check.bbclass
>> @@ -55,6 +55,10 @@ python cve_save_summary_handler () {
>>
>> cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
>>
>> + if not os.path.isfile(cve_tmp_file):
>> + bb.warn("File Not found: %s" % cve_tmp_file)
>> + return
>> +
> A warning is something the user really needs to fix or take some action
> about. Is this a warning?
Its actually an error in certail conditions. Do we want this to be
silent or fail on 'populate_sdk'?
>
> Cheers,
>
> Richard
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [v2][PATCH] cve-check: print warning if file is missing
2020-07-27 13:57 ` akuster
@ 2020-07-27 14:47 ` Richard Purdie
2020-07-27 16:05 ` akuster
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-07-27 14:47 UTC (permalink / raw)
To: akuster808, openembedded-core
On Mon, 2020-07-27 at 06:57 -0700, akuster808 wrote:
>
> On 7/27/20 2:39 AM, Richard Purdie wrote:
> > On Sun, 2020-07-26 at 19:52 -0700, akuster wrote:
> > > If the "tmp/cve_check" file was not create as in the case for -c
> > > populate_sdk, just print a
> > > warning instead of dumping a trace back
> > >
> > > ---
> > > v2] lets include the missing part of the patch
> > >
> > > Signed-off-by: Armin Kuster <akuster808@gmail.com>
> > > ---
> > > meta/classes/cve-check.bbclass | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-
> > > check.bbclass
> > > index 0889e7544aa..b16da9890af 100644
> > > --- a/meta/classes/cve-check.bbclass
> > > +++ b/meta/classes/cve-check.bbclass
> > > @@ -55,6 +55,10 @@ python cve_save_summary_handler () {
> > >
> > > cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
> > >
> > > + if not os.path.isfile(cve_tmp_file):
> > > + bb.warn("File Not found: %s" % cve_tmp_file)
> > > + return
> > > +
> > A warning is something the user really needs to fix or take some
> > action
> > about. Is this a warning?
> Its actually an error in certail conditions. Do we want this to be
> silent or fail on 'populate_sdk'?
What are the "certain conditions"?
Should it not detect those conditions and error if they occur?
Showing a warning and asking the user to guess is not a good user
experience. I have no idea whether I should worry about the warning
above or not for example, so I doubt anyone else does either.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [v2][PATCH] cve-check: print warning if file is missing
2020-07-27 14:47 ` Richard Purdie
@ 2020-07-27 16:05 ` akuster
2020-07-27 16:13 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: akuster @ 2020-07-27 16:05 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
On 7/27/20 7:47 AM, Richard Purdie wrote:
> On Mon, 2020-07-27 at 06:57 -0700, akuster808 wrote:
>> On 7/27/20 2:39 AM, Richard Purdie wrote:
>>> On Sun, 2020-07-26 at 19:52 -0700, akuster wrote:
>>>> If the "tmp/cve_check" file was not create as in the case for -c
>>>> populate_sdk, just print a
>>>> warning instead of dumping a trace back
>>>>
>>>> ---
>>>> v2] lets include the missing part of the patch
>>>>
>>>> Signed-off-by: Armin Kuster <akuster808@gmail.com>
>>>> ---
>>>> meta/classes/cve-check.bbclass | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-
>>>> check.bbclass
>>>> index 0889e7544aa..b16da9890af 100644
>>>> --- a/meta/classes/cve-check.bbclass
>>>> +++ b/meta/classes/cve-check.bbclass
>>>> @@ -55,6 +55,10 @@ python cve_save_summary_handler () {
>>>>
>>>> cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
>>>>
>>>> + if not os.path.isfile(cve_tmp_file):
>>>> + bb.warn("File Not found: %s" % cve_tmp_file)
>>>> + return
>>>> +
>>> A warning is something the user really needs to fix or take some
>>> action
>>> about. Is this a warning?
>> Its actually an error in certail conditions. Do we want this to be
>> silent or fail on 'populate_sdk'?
> What are the "certain conditions"?
populate_sdk
>
> Should it not detect those conditions and error if they occur?
if INHERIT += "cve-check' is included and -c populate_sdk, the file is
not generated.
>
> Showing a warning and asking the user to guess is not a good user
> experience. I have no idea whether I should worry about the warning
> above or not for example, so I doubt anyone else does either.
I am fine with not sending any warning.
- armin
>
> Cheers,
>
> Richard
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [v2][PATCH] cve-check: print warning if file is missing
2020-07-27 16:05 ` akuster
@ 2020-07-27 16:13 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2020-07-27 16:13 UTC (permalink / raw)
To: akuster808, openembedded-core
On Mon, 2020-07-27 at 09:05 -0700, akuster808 wrote:
>
> On 7/27/20 7:47 AM, Richard Purdie wrote:
> > On Mon, 2020-07-27 at 06:57 -0700, akuster808 wrote:
> > > On 7/27/20 2:39 AM, Richard Purdie wrote:
> > > > On Sun, 2020-07-26 at 19:52 -0700, akuster wrote:
> > > > > If the "tmp/cve_check" file was not create as in the case for
> > > > > -c
> > > > > populate_sdk, just print a
> > > > > warning instead of dumping a trace back
> > > > >
> > > > > ---
> > > > > v2] lets include the missing part of the patch
> > > > >
> > > > > Signed-off-by: Armin Kuster <akuster808@gmail.com>
> > > > > ---
> > > > > meta/classes/cve-check.bbclass | 4 ++++
> > > > > 1 file changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/meta/classes/cve-check.bbclass
> > > > > b/meta/classes/cve-
> > > > > check.bbclass
> > > > > index 0889e7544aa..b16da9890af 100644
> > > > > --- a/meta/classes/cve-check.bbclass
> > > > > +++ b/meta/classes/cve-check.bbclass
> > > > > @@ -55,6 +55,10 @@ python cve_save_summary_handler () {
> > > > >
> > > > > cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
> > > > >
> > > > > + if not os.path.isfile(cve_tmp_file):
> > > > > + bb.warn("File Not found: %s" % cve_tmp_file)
> > > > > + return
> > > > > +
> > > > A warning is something the user really needs to fix or take
> > > > some
> > > > action
> > > > about. Is this a warning?
> > > Its actually an error in certail conditions. Do we want this to
> > > be
> > > silent or fail on 'populate_sdk'?
> > What are the "certain conditions"?
>
> populate_sdk
>
> > Should it not detect those conditions and error if they occur?
> if INHERIT += "cve-check' is included and -c populate_sdk, the file
> is
> not generated.
>
> > Showing a warning and asking the user to guess is not a good user
> > experience. I have no idea whether I should worry about the warning
> > above or not for example, so I doubt anyone else does either.
>
> I am fine with not sending any warning.
That sounds like the correct solution to me in this case or maybe a
bb.note() which won't be shown on the console but probably will be in
the logs.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-27 16:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 2:52 [v2][PATCH] cve-check: print warning if file is missing akuster
2020-07-27 9:39 ` [OE-core] " Richard Purdie
2020-07-27 13:57 ` akuster
2020-07-27 14:47 ` Richard Purdie
2020-07-27 16:05 ` akuster
2020-07-27 16:13 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.