Patchwork [bitbake-devel,0/1,V2] bitbake-whatchanged: print what is about to happen

login
register
mail settings
Submitter Robert Yang
Date Aug. 10, 2012, 3:47 a.m.
Message ID <cover.1344569166.git.liezhi.yang@windriver.com>
Download mbox
Permalink /patch/34155/
State New
Headers show

Pull-request

git://git.pokylinux.org/poky-contrib robert/whatchanged

Comments

Robert Yang - Aug. 10, 2012, 3:47 a.m.
Changes of V2:

* Fix a typo fn -> 'fn'

* Use "bitbake -e" rather than "bitbake -e recipe" to get the BB_STAMPS_DIR

* Use "BB_STAMPS_DIR=<path> bitbake -S recipe" to regenerate the stamps

* Change the summary format a little, now it looks like:
  - (without -v):
    === Summary: (3653 changed, 1927 unchanged)
    Newly added: 807
    PV changed: 48
    PR changed: 276
    Depends changed: 2522

  - (with -v):
    === Summary: (3653 changed, 1927 unchanged)
    Newly added: 807
    Depends changed: 2846

// Robert

The following changes since commit 2dec760b79bb7e2e79c33c5127fa64685bd86a18:

  foomatic: fix perl path for target (2012-08-08 10:06:00 +0100)

are available in the git repository at:

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

Robert Yang (1):
  bitbake-whatchanged: print what is about to happen

 bitbake/bin/bitbake-whatchanged | 328 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 328 insertions(+)
 create mode 100755 bitbake/bin/bitbake-whatchanged
Paul Eggleton - Aug. 10, 2012, 2:28 p.m.
On Friday 10 August 2012 11:47:38 Robert Yang wrote:
> Changes of V2:
> 
> * Fix a typo fn -> 'fn'
> 
> * Use "bitbake -e" rather than "bitbake -e recipe" to get the BB_STAMPS_DIR
> 
> * Use "BB_STAMPS_DIR=<path> bitbake -S recipe" to regenerate the stamps
> 
> * Change the summary format a little, now it looks like:
>   - (without -v):
>     === Summary: (3653 changed, 1927 unchanged)
>     Newly added: 807
>     PV changed: 48
>     PR changed: 276
>     Depends changed: 2522
> 
>   - (with -v):
>     === Summary: (3653 changed, 1927 unchanged)
>     Newly added: 807
>     Depends changed: 2846
> 
> // Robert
> 
> The following changes since commit 2dec760b79bb7e2e79c33c5127fa64685bd86a18:
> 
>   foomatic: fix perl path for target (2012-08-08 10:06:00 +0100)

So leaving Chris's objections aside for a moment, I applied this and the 
BB_STAMPS_DIR change, and ran the script on my build directory which is out of 
date with respect to the metadata (i.e. metadata has been updated since the 
last build). The output seems to suggest that no changes have been made, which 
is not the case:

----------- snip -----------
$ bitbake-whatchanged core-image-minimal
Figuring out the BB_STAMPS_DIR ...
Generating the new stamps ... (need several minutes)

=== Summary: (0 changed, 0 unchanged)
Newly added: 0
PV changed: 0
PR changed: 0
Depends changed: 0
----------- snip -----------

Cheers,
Paul
Robert Yang - Aug. 11, 2012, 2:05 a.m.
On 08/10/2012 10:28 PM, Paul Eggleton wrote:
> On Friday 10 August 2012 11:47:38 Robert Yang wrote:
>> Changes of V2:
>>
>> * Fix a typo fn -> 'fn'
>>
>> * Use "bitbake -e" rather than "bitbake -e recipe" to get the BB_STAMPS_DIR
>>
>> * Use "BB_STAMPS_DIR=<path> bitbake -S recipe" to regenerate the stamps
>>
>> * Change the summary format a little, now it looks like:
>>    - (without -v):
>>      === Summary: (3653 changed, 1927 unchanged)
>>      Newly added: 807
>>      PV changed: 48
>>      PR changed: 276
>>      Depends changed: 2522
>>
>>    - (with -v):
>>      === Summary: (3653 changed, 1927 unchanged)
>>      Newly added: 807
>>      Depends changed: 2846
>>
>> // Robert
>>
>> The following changes since commit 2dec760b79bb7e2e79c33c5127fa64685bd86a18:
>>
>>    foomatic: fix perl path for target (2012-08-08 10:06:00 +0100)
>
> So leaving Chris's objections aside for a moment, I applied this and the
> BB_STAMPS_DIR change, and ran the script on my build directory which is out of
> date with respect to the metadata (i.e. metadata has been updated since the
> last build). The output seems to suggest that no changes have been made, which
> is not the case:
>

Thanks Paul, did you re-run the oe-init-build-env, please? Otherwise the
BB_STAMPS_DIR would have no effect since it would not  be in the BB_ENV_EXTRAWHITE.

// Robert

> ----------- snip -----------
> $ bitbake-whatchanged core-image-minimal
> Figuring out the BB_STAMPS_DIR ...
> Generating the new stamps ... (need several minutes)
>
> === Summary: (0 changed, 0 unchanged)
> Newly added: 0
> PV changed: 0
> PR changed: 0
> Depends changed: 0
> ----------- snip -----------
>
> Cheers,
> Paul
>
Robert Yang - Aug. 11, 2012, 3:10 a.m.
On 08/11/2012 10:05 AM, Robert Yang wrote:
>
>
> On 08/10/2012 10:28 PM, Paul Eggleton wrote:
>> On Friday 10 August 2012 11:47:38 Robert Yang wrote:
>>> Changes of V2:
>>>
>>> * Fix a typo fn -> 'fn'
>>>
>>> * Use "bitbake -e" rather than "bitbake -e recipe" to get the BB_STAMPS_DIR
>>>
>>> * Use "BB_STAMPS_DIR=<path> bitbake -S recipe" to regenerate the stamps
>>>
>>> * Change the summary format a little, now it looks like:
>>>    - (without -v):
>>>      === Summary: (3653 changed, 1927 unchanged)
>>>      Newly added: 807
>>>      PV changed: 48
>>>      PR changed: 276
>>>      Depends changed: 2522
>>>
>>>    - (with -v):
>>>      === Summary: (3653 changed, 1927 unchanged)
>>>      Newly added: 807
>>>      Depends changed: 2846
>>>
>>> // Robert
>>>
>>> The following changes since commit 2dec760b79bb7e2e79c33c5127fa64685bd86a18:
>>>
>>>    foomatic: fix perl path for target (2012-08-08 10:06:00 +0100)
>>
>> So leaving Chris's objections aside for a moment, I applied this and the
>> BB_STAMPS_DIR change, and ran the script on my build directory which is out of
>> date with respect to the metadata (i.e. metadata has been updated since the
>> last build). The output seems to suggest that no changes have been made, which
>> is not the case:
>>
>
> Thanks Paul, did you re-run the oe-init-build-env, please? Otherwise the
> BB_STAMPS_DIR would have no effect since it would not  be in the BB_ENV_EXTRAWHITE.
>

It seems that you had re-run the oe-init-build-env since when no BB_STAMPS_DIR
it would print errors., I think that the problem is  the "bitbake -S" didn't
work well since it has bugs, I have updated the related code a little, and it
would tell what's wrong:

         # FIXME
         # The "bitbake -S" may fail, not fatal error, the stamps will still
         # be generated, this might be a bug of "bitbake -S".
         try:
             bb.process.run(cmdline)
         except Exception as exc:
             print(exc)

I have pushed it to git repo, it would be great if you can help me to test it,
and I will invite you beer when you come to Beijing:-)

// Robert

> // Robert
>
>> ----------- snip -----------
>> $ bitbake-whatchanged core-image-minimal
>> Figuring out the BB_STAMPS_DIR ...
>> Generating the new stamps ... (need several minutes)
>>
>> === Summary: (0 changed, 0 unchanged)
>> Newly added: 0
>> PV changed: 0
>> PR changed: 0
>> Depends changed: 0
>> ----------- snip -----------
>>
>> Cheers,
>> Paul
>>
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel
>
>