All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
@ 2013-09-26  5:23 Qi.Chen
  2013-09-26  5:23 ` [PATCH 1/1] " Qi.Chen
  0 siblings, 1 reply; 8+ messages in thread
From: Qi.Chen @ 2013-09-26  5:23 UTC (permalink / raw
  To: openembedded-core

From: Chen Qi <Qi.Chen@windriver.com>

The following changes since commit 4d8ab87d25ea6e59dc88375813ef88ee0ac813d0:

  build-appliance: Update SRCREV (2013-09-24 18:09:12 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/buildhistory
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/buildhistory

Chen Qi (1):
  buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR

 meta/classes/buildhistory.bbclass |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-09-26  5:23 [PATCH 0/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR Qi.Chen
@ 2013-09-26  5:23 ` Qi.Chen
  2013-09-30 16:26   ` Paul Eggleton
  0 siblings, 1 reply; 8+ messages in thread
From: Qi.Chen @ 2013-09-26  5:23 UTC (permalink / raw
  To: openembedded-core

From: Chen Qi <Qi.Chen@windriver.com>

The buildhistory.bbclass always records PV instead of PKGV. However,
the buildhistory-diff script treats PKGV as a monitored variable
instead of PV.

If a recipe's PV changes, for example, hello_1.0.bb is renamed to
hello_2.0.bb, then buildhistory-diff reports nothing because PV is
not monitored and PKGV is not recorded.

So the buildhistory.bbclass should always record PKGV no matter it
equals to PV or not.

The same logic applies to PKG, PKGE and PKGR.

[YOCTO #5263]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/buildhistory.bbclass |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3da03c8..cea917c 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
         f.write("PR = %s\n" %  pkginfo.pr)
 
         pkgvars = {}
-        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name else ''
-        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe else ''
-        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != pkginfo.pv else ''
-        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr != pkginfo.pr else ''
+        pkgvars['PKG'] = pkginfo.pkg
+        pkgvars['PKGE'] = pkginfo.pkge
+        pkgvars['PKGV'] = pkginfo.pkgv
+        pkgvars['PKGR'] = pkginfo.pkgr
         for pkgvar in pkgvars:
             val = pkgvars[pkgvar]
             if val:
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-09-26  5:23 ` [PATCH 1/1] " Qi.Chen
@ 2013-09-30 16:26   ` Paul Eggleton
  2013-10-01 17:28     ` Mark Hatle
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2013-09-30 16:26 UTC (permalink / raw
  To: Chen Qi, openembedded-core

On Thursday 26 September 2013 13:23:32 Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
> 
> The buildhistory.bbclass always records PV instead of PKGV. However,
> the buildhistory-diff script treats PKGV as a monitored variable
> instead of PV.
> 
> If a recipe's PV changes, for example, hello_1.0.bb is renamed to
> hello_2.0.bb, then buildhistory-diff reports nothing because PV is
> not monitored and PKGV is not recorded.
> 
> So the buildhistory.bbclass should always record PKGV no matter it
> equals to PV or not.
> 
> The same logic applies to PKG, PKGE and PKGR.
> 
> [YOCTO #5263]
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/classes/buildhistory.bbclass |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/buildhistory.bbclass
> b/meta/classes/buildhistory.bbclass index 3da03c8..cea917c 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
>          f.write("PR = %s\n" %  pkginfo.pr)
> 
>          pkgvars = {}
> -        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name else ''
> -        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe else
> '' -        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != pkginfo.pv
> else '' -        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr !=
> pkginfo.pr else '' +        pkgvars['PKG'] = pkginfo.pkg
> +        pkgvars['PKGE'] = pkginfo.pkge
> +        pkgvars['PKGV'] = pkginfo.pkgv
> +        pkgvars['PKGR'] = pkginfo.pkgr
>          for pkgvar in pkgvars:
>              val = pkgvars[pkgvar]
>              if val:

Please see my comment on the bug (just added):
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5263

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-09-30 16:26   ` Paul Eggleton
@ 2013-10-01 17:28     ` Mark Hatle
  2013-10-15 19:58       ` Randy MacLeod
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Hatle @ 2013-10-01 17:28 UTC (permalink / raw
  To: openembedded-core

On 9/30/13 11:26 AM, Paul Eggleton wrote:
> On Thursday 26 September 2013 13:23:32 Qi.Chen@windriver.com wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> The buildhistory.bbclass always records PV instead of PKGV. However,
>> the buildhistory-diff script treats PKGV as a monitored variable
>> instead of PV.
>>
>> If a recipe's PV changes, for example, hello_1.0.bb is renamed to
>> hello_2.0.bb, then buildhistory-diff reports nothing because PV is
>> not monitored and PKGV is not recorded.
>>
>> So the buildhistory.bbclass should always record PKGV no matter it
>> equals to PV or not.
>>
>> The same logic applies to PKG, PKGE and PKGR.
>>
>> [YOCTO #5263]
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   meta/classes/buildhistory.bbclass |    8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/buildhistory.bbclass
>> b/meta/classes/buildhistory.bbclass index 3da03c8..cea917c 100644
>> --- a/meta/classes/buildhistory.bbclass
>> +++ b/meta/classes/buildhistory.bbclass
>> @@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
>>           f.write("PR = %s\n" %  pkginfo.pr)
>>
>>           pkgvars = {}
>> -        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name else ''
>> -        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe else
>> '' -        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != pkginfo.pv
>> else '' -        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr !=
>> pkginfo.pr else '' +        pkgvars['PKG'] = pkginfo.pkg
>> +        pkgvars['PKGE'] = pkginfo.pkge
>> +        pkgvars['PKGV'] = pkginfo.pkgv
>> +        pkgvars['PKGR'] = pkginfo.pkgr
>>           for pkgvar in pkgvars:
>>               val = pkgvars[pkgvar]
>>               if val:
>
> Please see my comment on the bug (just added):
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5263

Already added to the bug, but here so people not watching the bug can see:

I believe this change is requested because otherwise there is no way to detect a 
package upgrade/uprev when using buildhistory.  This type of upgrade can happy 
when comparing no-GPLv3 and GPLv3 builds -- or just simple software updates when 
a layer gets updated.

We want to use the buildhistory from one build to the next to look for changes 
that have occurred that may be unexpected.

--Mark

> Cheers,
> Paul
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-10-01 17:28     ` Mark Hatle
@ 2013-10-15 19:58       ` Randy MacLeod
  2013-10-15 21:32         ` Paul Eggleton
  2013-10-17  2:48         ` ChenQi
  0 siblings, 2 replies; 8+ messages in thread
From: Randy MacLeod @ 2013-10-15 19:58 UTC (permalink / raw
  To: openembedded-core, ChenQi, Paul Eggleton

On 13-10-01 01:28 PM, Mark Hatle wrote:
> On 9/30/13 11:26 AM, Paul Eggleton wrote:
>> On Thursday 26 September 2013 13:23:32 Qi.Chen@windriver.com wrote:
>>> From: Chen Qi <Qi.Chen@windriver.com>
>>>
>>> The buildhistory.bbclass always records PV instead of PKGV. However,
>>> the buildhistory-diff script treats PKGV as a monitored variable
>>> instead of PV.
>>>
>>> If a recipe's PV changes, for example, hello_1.0.bb is renamed to
>>> hello_2.0.bb, then buildhistory-diff reports nothing because PV is
>>> not monitored and PKGV is not recorded.
>>>
>>> So the buildhistory.bbclass should always record PKGV no matter it
>>> equals to PV or not.
>>>
>>> The same logic applies to PKG, PKGE and PKGR.
>>>
>>> [YOCTO #5263]
>>>
>>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>>> ---
>>>   meta/classes/buildhistory.bbclass |    8 ++++----
>>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meta/classes/buildhistory.bbclass
>>> b/meta/classes/buildhistory.bbclass index 3da03c8..cea917c 100644
>>> --- a/meta/classes/buildhistory.bbclass
>>> +++ b/meta/classes/buildhistory.bbclass
>>> @@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
>>>           f.write("PR = %s\n" %  pkginfo.pr)
>>>
>>>           pkgvars = {}
>>> -        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name
>>> else ''
>>> -        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe
>>> else
>>> '' -        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != pkginfo.pv
>>> else '' -        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr !=
>>> pkginfo.pr else '' +        pkgvars['PKG'] = pkginfo.pkg
>>> +        pkgvars['PKGE'] = pkginfo.pkge
>>> +        pkgvars['PKGV'] = pkginfo.pkgv
>>> +        pkgvars['PKGR'] = pkginfo.pkgr
>>>           for pkgvar in pkgvars:
>>>               val = pkgvars[pkgvar]
>>>               if val:
>>
>> Please see my comment on the bug (just added):
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5263
>
> Already added to the bug, but here so people not watching the bug can see:
>
> I believe this change is requested because otherwise there is no way to
> detect a package upgrade/uprev when using buildhistory.  This type of
> upgrade can happy when comparing no-GPLv3 and GPLv3 builds -- or just
> simple software updates when a layer gets updated.
>
> We want to use the buildhistory from one build to the next to look for
> changes that have occurred that may be unexpected.
>
> --Mark

Paul,
Any comments?
Qi replied to your comment in bugzilla.

Qi,
Perhaps you need to post an example showing how this change
helps for a package upgrade and compare it to what happens when
the patch is not applied.

// Randy


>
>> Cheers,
>> Paul
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>


-- 
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-10-15 19:58       ` Randy MacLeod
@ 2013-10-15 21:32         ` Paul Eggleton
  2013-10-17  2:48         ` ChenQi
  1 sibling, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2013-10-15 21:32 UTC (permalink / raw
  To: Randy MacLeod; +Cc: openembedded-core

On Tuesday 15 October 2013 15:58:17 Randy MacLeod wrote:
> On 13-10-01 01:28 PM, Mark Hatle wrote:
> > On 9/30/13 11:26 AM, Paul Eggleton wrote:
> >> On Thursday 26 September 2013 13:23:32 Qi.Chen@windriver.com wrote:
> >>> From: Chen Qi <Qi.Chen@windriver.com>
> >>> 
> >>> The buildhistory.bbclass always records PV instead of PKGV. However,
> >>> the buildhistory-diff script treats PKGV as a monitored variable
> >>> instead of PV.
> >>> 
> >>> If a recipe's PV changes, for example, hello_1.0.bb is renamed to
> >>> hello_2.0.bb, then buildhistory-diff reports nothing because PV is
> >>> not monitored and PKGV is not recorded.
> >>> 
> >>> So the buildhistory.bbclass should always record PKGV no matter it
> >>> equals to PV or not.
> >>> 
> >>> The same logic applies to PKG, PKGE and PKGR.
> >>> 
> >>> [YOCTO #5263]
> >>> 
> >>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> >>> ---
> >>> 
> >>>   meta/classes/buildhistory.bbclass |    8 ++++----
> >>>   1 file changed, 4 insertions(+), 4 deletions(-)
> >>> 
> >>> diff --git a/meta/classes/buildhistory.bbclass
> >>> b/meta/classes/buildhistory.bbclass index 3da03c8..cea917c 100644
> >>> --- a/meta/classes/buildhistory.bbclass
> >>> +++ b/meta/classes/buildhistory.bbclass
> >>> 
> >>> @@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
> >>>           f.write("PR = %s\n" %  pkginfo.pr)
> >>>           
> >>>           pkgvars = {}
> >>> 
> >>> -        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name
> >>> else ''
> >>> -        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe
> >>> else
> >>> '' -        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != pkginfo.pv
> >>> else '' -        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr !=
> >>> pkginfo.pr else '' +        pkgvars['PKG'] = pkginfo.pkg
> >>> +        pkgvars['PKGE'] = pkginfo.pkge
> >>> +        pkgvars['PKGV'] = pkginfo.pkgv
> >>> +        pkgvars['PKGR'] = pkginfo.pkgr
> >>> 
> >>>           for pkgvar in pkgvars:
> >>>               val = pkgvars[pkgvar]
> >> 
> >>>               if val:
> >> Please see my comment on the bug (just added):
> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5263
> > 
> > Already added to the bug, but here so people not watching the bug can see:
> > 
> > I believe this change is requested because otherwise there is no way to
> > detect a package upgrade/uprev when using buildhistory.  This type of
> > upgrade can happy when comparing no-GPLv3 and GPLv3 builds -- or just
> > simple software updates when a layer gets updated.
> > 
> > We want to use the buildhistory from one build to the next to look for
> > changes that have occurred that may be unexpected.
> > 
> > --Mark
> 
> Paul,
> Any comments?
> Qi replied to your comment in bugzilla.
> 
> Qi,
> Perhaps you need to post an example showing how this change
> helps for a package upgrade and compare it to what happens when
> the patch is not applied.

My apologies, I've been meaning to get back to this. I'll run some tests 
tomorrow so we can get a definitive resolution.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-10-15 19:58       ` Randy MacLeod
  2013-10-15 21:32         ` Paul Eggleton
@ 2013-10-17  2:48         ` ChenQi
  2013-10-17 13:07           ` Paul Eggleton
  1 sibling, 1 reply; 8+ messages in thread
From: ChenQi @ 2013-10-17  2:48 UTC (permalink / raw
  To: Randy MacLeod; +Cc: Paul Eggleton, openembedded-core

On 10/16/2013 03:58 AM, Randy MacLeod wrote:
> On 13-10-01 01:28 PM, Mark Hatle wrote:
>> On 9/30/13 11:26 AM, Paul Eggleton wrote:
>>> On Thursday 26 September 2013 13:23:32 Qi.Chen@windriver.com wrote:
>>>> From: Chen Qi <Qi.Chen@windriver.com>
>>>>
>>>> The buildhistory.bbclass always records PV instead of PKGV. However,
>>>> the buildhistory-diff script treats PKGV as a monitored variable
>>>> instead of PV.
>>>>
>>>> If a recipe's PV changes, for example, hello_1.0.bb is renamed to
>>>> hello_2.0.bb, then buildhistory-diff reports nothing because PV is
>>>> not monitored and PKGV is not recorded.
>>>>
>>>> So the buildhistory.bbclass should always record PKGV no matter it
>>>> equals to PV or not.
>>>>
>>>> The same logic applies to PKG, PKGE and PKGR.
>>>>
>>>> [YOCTO #5263]
>>>>
>>>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>>>> ---
>>>>   meta/classes/buildhistory.bbclass |    8 ++++----
>>>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/meta/classes/buildhistory.bbclass
>>>> b/meta/classes/buildhistory.bbclass index 3da03c8..cea917c 100644
>>>> --- a/meta/classes/buildhistory.bbclass
>>>> +++ b/meta/classes/buildhistory.bbclass
>>>> @@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
>>>>           f.write("PR = %s\n" %  pkginfo.pr)
>>>>
>>>>           pkgvars = {}
>>>> -        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name
>>>> else ''
>>>> -        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe
>>>> else
>>>> '' -        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != 
>>>> pkginfo.pv
>>>> else '' -        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr !=
>>>> pkginfo.pr else '' +        pkgvars['PKG'] = pkginfo.pkg
>>>> +        pkgvars['PKGE'] = pkginfo.pkge
>>>> +        pkgvars['PKGV'] = pkginfo.pkgv
>>>> +        pkgvars['PKGR'] = pkginfo.pkgr
>>>>           for pkgvar in pkgvars:
>>>>               val = pkgvars[pkgvar]
>>>>               if val:
>>>
>>> Please see my comment on the bug (just added):
>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5263
>>
>> Already added to the bug, but here so people not watching the bug can 
>> see:
>>
>> I believe this change is requested because otherwise there is no way to
>> detect a package upgrade/uprev when using buildhistory.  This type of
>> upgrade can happy when comparing no-GPLv3 and GPLv3 builds -- or just
>> simple software updates when a layer gets updated.
>>
>> We want to use the buildhistory from one build to the next to look for
>> changes that have occurred that may be unexpected.
>>
>> --Mark
>
> Paul,
> Any comments?
> Qi replied to your comment in bugzilla.
>
> Qi,
> Perhaps you need to post an example showing how this change
> helps for a package upgrade and compare it to what happens when
> the patch is not applied.
>
> // Randy
>
>
Hi All,

Use the following steps to test the buildhistory.

1. bitbake chown-example
2. mv ../meta-local/recipes-core/chown-example/chown-example_1.0.bb 
../meta-local/recipes-core/chown-example/chown-example_2.0.bb
3. bitbake chown-example
4. buildhistory-diff

Testing Result
-------------------
*) Without the patch
    <No Output for buildhistory-diff>
*) With the patch
<Below is the output.>
chenqi@pek-qchen1-u12u4:~/poky/build$ buildhistory-diff
packages/i586-poky-linux/chown-example/chown-example-dbg: PKGV changed 
from 1.0 to 2.0
   * PV changed from "1.0" to "2.0"
packages/i586-poky-linux/chown-example/chown-example-dev: PKGV changed 
from 1.0 to 2.0
   * PV changed from "1.0" to "2.0"
packages/i586-poky-linux/chown-example/chown-example-doc: PKGV changed 
from 1.0 to 2.0
   * PV changed from "1.0" to "2.0"
packages/i586-poky-linux/chown-example/chown-example-locale: PKGV 
changed from 1.0 to 2.0
   * PV changed from "1.0" to "2.0"
packages/i586-poky-linux/chown-example/chown-example-staticdev: PKGV 
changed from 1.0 to 2.0
   * PV changed from "1.0" to "2.0"
packages/i586-poky-linux/chown-example/chown-example: PKGV changed from 
1.0 to 2.0
   * PV changed from "1.0" to "2.0"

Best Regards,
Chen Qi

>>
>>> Cheers,
>>> Paul
>>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR
  2013-10-17  2:48         ` ChenQi
@ 2013-10-17 13:07           ` Paul Eggleton
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2013-10-17 13:07 UTC (permalink / raw
  To: ChenQi; +Cc: openembedded-core

On Thursday 17 October 2013 10:48:34 ChenQi wrote:
> On 10/16/2013 03:58 AM, Randy MacLeod wrote:
> > On 13-10-01 01:28 PM, Mark Hatle wrote:
> >> On 9/30/13 11:26 AM, Paul Eggleton wrote:
> >>> On Thursday 26 September 2013 13:23:32 Qi.Chen@windriver.com wrote:
> >>>> From: Chen Qi <Qi.Chen@windriver.com>
> >>>> 
> >>>> The buildhistory.bbclass always records PV instead of PKGV. However,
> >>>> the buildhistory-diff script treats PKGV as a monitored variable
> >>>> instead of PV.
> >>>> 
> >>>> If a recipe's PV changes, for example, hello_1.0.bb is renamed to
> >>>> hello_2.0.bb, then buildhistory-diff reports nothing because PV is
> >>>> not monitored and PKGV is not recorded.
> >>>> 
> >>>> So the buildhistory.bbclass should always record PKGV no matter it
> >>>> equals to PV or not.
> >>>> 
> >>>> The same logic applies to PKG, PKGE and PKGR.
> >>>> 
> >>>> [YOCTO #5263]
> >>>> 
> >>>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> >>>> ---
> >>>> 
> >>>>   meta/classes/buildhistory.bbclass |    8 ++++----
> >>>>   1 file changed, 4 insertions(+), 4 deletions(-)
> >>>> 
> >>>> diff --git a/meta/classes/buildhistory.bbclass
> >>>> b/meta/classes/buildhistory.bbclass index 3da03c8..cea917c 100644
> >>>> --- a/meta/classes/buildhistory.bbclass
> >>>> +++ b/meta/classes/buildhistory.bbclass
> >>>> 
> >>>> @@ -277,10 +277,10 @@ def write_pkghistory(pkginfo, d):
> >>>>           f.write("PR = %s\n" %  pkginfo.pr)
> >>>>           
> >>>>           pkgvars = {}
> >>>> 
> >>>> -        pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name
> >>>> else ''
> >>>> -        pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe
> >>>> else
> >>>> '' -        pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv !=
> >>>> pkginfo.pv
> >>>> else '' -        pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr !=
> >>>> pkginfo.pr else '' +        pkgvars['PKG'] = pkginfo.pkg
> >>>> +        pkgvars['PKGE'] = pkginfo.pkge
> >>>> +        pkgvars['PKGV'] = pkginfo.pkgv
> >>>> +        pkgvars['PKGR'] = pkginfo.pkgr
> >>>> 
> >>>>           for pkgvar in pkgvars:
> >>>>               val = pkgvars[pkgvar]
> >>> 
> >>>>               if val:
> >>> Please see my comment on the bug (just added):
> >>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5263
> >> 
> >> Already added to the bug, but here so people not watching the bug can
> >> see:
> >> 
> >> I believe this change is requested because otherwise there is no way to
> >> detect a package upgrade/uprev when using buildhistory.  This type of
> >> upgrade can happy when comparing no-GPLv3 and GPLv3 builds -- or just
> >> simple software updates when a layer gets updated.
> >> 
> >> We want to use the buildhistory from one build to the next to look for
> >> changes that have occurred that may be unexpected.
> >> 
> >> --Mark
> > 
> > Paul,
> > Any comments?
> > Qi replied to your comment in bugzilla.
> > 
> > Qi,
> > Perhaps you need to post an example showing how this change
> > helps for a package upgrade and compare it to what happens when
> > the patch is not applied.
> > 
> > // Randy
> 
> Hi All,
> 
> Use the following steps to test the buildhistory.
> 
> 1. bitbake chown-example
> 2. mv ../meta-local/recipes-core/chown-example/chown-example_1.0.bb
> ../meta-local/recipes-core/chown-example/chown-example_2.0.bb
> 3. bitbake chown-example
> 4. buildhistory-diff
> 
> Testing Result
> -------------------
> *) Without the patch
>     <No Output for buildhistory-diff>
> *) With the patch
> <Below is the output.>
> chenqi@pek-qchen1-u12u4:~/poky/build$ buildhistory-diff
> packages/i586-poky-linux/chown-example/chown-example-dbg: PKGV changed
> from 1.0 to 2.0
>    * PV changed from "1.0" to "2.0"
> packages/i586-poky-linux/chown-example/chown-example-dev: PKGV changed
> from 1.0 to 2.0
>    * PV changed from "1.0" to "2.0"
> packages/i586-poky-linux/chown-example/chown-example-doc: PKGV changed
> from 1.0 to 2.0
>    * PV changed from "1.0" to "2.0"
> packages/i586-poky-linux/chown-example/chown-example-locale: PKGV
> changed from 1.0 to 2.0
>    * PV changed from "1.0" to "2.0"
> packages/i586-poky-linux/chown-example/chown-example-staticdev: PKGV
> changed from 1.0 to 2.0
>    * PV changed from "1.0" to "2.0"
> packages/i586-poky-linux/chown-example/chown-example: PKGV changed from
> 1.0 to 2.0
>    * PV changed from "1.0" to "2.0"
> 
> Best Regards,
> Chen Qi

A couple of things:

1) buildhistory-diff is intentionally not reporting version values changing, on 
the assumption that most of the time the user is aware when these changes 
occur. Based on what you have described there is a case for adding an option 
to report these changes however.

2) The patch as submitted not only records redundant information but also 
breaks the ability to see when the value changes from the "default" value to a 
custom value or vice versa, which is what the code was originally designed to 
do.

I am about to send a different patch that adds the option to show these changes 
and addresses #2 above.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-10-17 13:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-26  5:23 [PATCH 0/1] buildhistory.bbclass: always record PKG, PKGE, PKGV and PKGR Qi.Chen
2013-09-26  5:23 ` [PATCH 1/1] " Qi.Chen
2013-09-30 16:26   ` Paul Eggleton
2013-10-01 17:28     ` Mark Hatle
2013-10-15 19:58       ` Randy MacLeod
2013-10-15 21:32         ` Paul Eggleton
2013-10-17  2:48         ` ChenQi
2013-10-17 13:07           ` Paul Eggleton

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.