[oe] Using ${DATE} in PR

Chris Verges kg4ysn at gmail.com
Sat Jul 9 15:39:22 UTC 2011


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?

Thanks,
Chris

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"
>
> Perhaps because ${DATE} in bitbake.conf is declared without the "${@"
> tag this causes a more "static" interpretation of the variable?
>
> Hope this helps someone else in the future,
> Chris
>
> On Fri, Jul 8, 2011 at 7:21 AM, Chris Verges <kg4ysn at gmail.com> wrote:
>> Hi all,
>>
>> I'm attempting to use the ${DATE} variable from
>> openembedded/conf/bitbake.conf in the PR value of a local overlay
>> recipe.  The idea is to create a recipe that will automatically
>> rebuild each day.  (The recipe itself is creates a small text file in
>> /etc that tracks the build date.)  BitBake is at 1.12.0, and OE is on
>> 2011.03-maintenance.
>>
>> Unfortunately, the following didn't work as I expected:
>>
>> PR = "r5.${DATE}.0"
>>
>> (I use the "r5" prefix field to increment in case I make any major
>> changes to the PR format, and the "0" suffix field to increment any
>> minor changes to the recipe itself.)
>>
>> The expected behavior is that the recipe will automatically rebuild
>> each day.  The actual behavior is that the recipe does not rebuild.
>>
>> Does anyone have any ideas on what I'm overlooking?
>>
>> Thanks,
>> Chris
>>
>




More information about the Openembedded-devel mailing list