Bug 7306

Summary: Using SRCREV = "${AUTOREV}" doesn't always fetch latest revision
Product: [Build System, Metadata & Runtime] BitBake Reporter: Alexandre Belloni <alexandre.belloni>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Undecided CC: bluelightning, poky.bs.watcher, poky.watcher, richard.purdie, srifenbark
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard: 19 February 2015: Docs updated and okay'ed
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Alexandre Belloni 2015-02-11 10:33:01 UTC
I'm using SRCREV = "${AUTOREV}" in a kernel recipe (inheriting kernel, so ${SRCPV} is in PV).

The latest version of my kernel is only fetched if I change my defconfig.

Using bitbake virtual/kernel twice doesn't even go through srcrev_internal_helper().
Comment 1 Alexandre Belloni 2015-02-11 20:33:28 UTC
Actually, the kernel class is not putting ${SRCPV} in PV. Doing that solved the issue. It may be good to update the documentation.
Comment 2 Scott Rifenbark 2015-02-13 16:26:29 UTC
Hi, 

I was alerted to the fact that we need some documentation changes here for this issue.  I have updated two variables in the glossary to try to explain this issue.  You can see them at:

  http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#var-AUTOREV
  http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#var-SRCREV

Please look the changes over and let me know if they are okay.

Thanks,
Scott
Comment 3 Alexandre Belloni 2015-02-13 16:30:44 UTC
Hi,

I'm not sure you should actually mention the kernel class at all, the comment about having PV containing SRCPV is valid for all recipes.
Comment 5 Alexandre Belloni 2015-02-13 17:55:18 UTC
For AUTOREV, what about:

If you use the previous statement to retrieve the latest version of software, you need to be sure PV contains ${SRCPV}. For example, suppose you have a kernel recipe that inherits the kernel class and you use the previous statement. In this example, ${SRCPV} does not automatically get into PV. Consequently, you need to change PV in your recipe so that it does contain ${SRCPV}.
Comment 6 Scott Rifenbark 2015-02-13 18:04:31 UTC
Alexandre, 

I like your wording.  I have taken it verbatim.  You can re-check the link and see the update. 

Thanks, 
Scott
Comment 7 Alexandre Belloni 2015-02-13 18:09:50 UTC
I'm fine with that change (obviously !)
Comment 8 Scott Rifenbark 2015-02-19 22:35:12 UTC
Hi, 

Unsure as to how to indicate the docs have been completed for this issue.  The actual state has been set to RESOLVED/INVALID and I have the documentation flag set to "done."  I guess this comment here basically acknowledges that the change was looked at and approved by Alexandre.  I am done with it.

Thanks,
Scott