[oe] Using ${DATE} in PR

Chris Verges kg4ysn at gmail.com
Sun Jul 10 00:59:03 UTC 2011


On Sat, Jul 09, 2011 at 08:39:22AM -0700, Chris Verges wrote:
> On Fri, Jul 8, 2011 at 7:55 AM, Chris Verges <kg4ysn at gmail.com> wrote:
> > Using ${DATE} didn't work, but I was able to use a similar trick to
> > get this working:
> >
> > BUILD_DATE ?= "${@time.strftime('%Y%m%d', time.gmtime())}"
> > PR = "r5.${BUILD_DATE}.0"
>
> Update on this ... it turns out that touching the recipe file (i.e.
> updating the last accessed timestamp on the file) is what caused
> things to rebuild.  Is there a way to tell bitbake to ignore caching a
> recipe and/or always reevaluate the PR value in the recipe itself?

Hi list,

Apologies for the top posting before.  The only mail client I had
available was gmail's web interface, which isn't too netiquette
friendly.

I did some more digging into the BitBake sources.  I found the
__BB_DONT_CACHE variable declared in bitbake/lib/bb/cache.py, and have
set it to a value of "1" in the recipe that is using a dynamically
generated PR value.  I'll test tomorrow to see if it truly fixed things.

The recipe so far:

   # Prevent BitBake from caching this recipe
   __BB_DONT_CACHE = "1"

   # The PR value is formatted as 'rX.DATE.Y' where 'X' is incremented
   # only if the PR format changes, 'DATE' is dynamically generated by
   # BitBake itself, and 'Y' should be incremented each time the recipe
   # is manually changed.
   PR = "r3.${DATE}.7"

Hope this helps anyone else looking to do tracking on nightly builds.

Chris




More information about the Openembedded-devel mailing list