We use
SRCREV_pn-${PN} = "${AUTOREV}"
in most of our svn based recipes with only occasional minor issues.
The recipe that spawned this patch needs to pull source from the head
revision of 2 separate SVN repositories and we weren't exactly sure
how to do that using the above. The bitbake manual page on SVN Fetcher
(http://bitbake.berlios.de/manual/ch03s06.html) seemed to suggest that
adding date=now was the best way of doing this. Is there some other
easy way that we've missed?

On Fri, Jul 9, 2010 at 1:10 PM, Chris Larson <[email protected]> wrote:
> Is there a particular reason behind your not utilizing the existing
> SRCDATE/SRCREV/AUTOREV functionality?
>
> On Fri, Jul 9, 2010 at 12:05 PM, Daniel Lazzari <[email protected]>
> wrote:
>>
>> We were working on a local recipe that pulls source from SVN and
>> noticed that using date=now in an SVN SRC_URI did not work. It appears
>> that the date parameter doesn't work at all. I wrote a quick patch to
>> fix the functionality and in my very limited tests it seems to work
>> fine.
>>
>> This was made against git://git.openembedded.org/bitbake and was a
>> quick fix so feel free to modify or reject if something looks wrong.
>>
>> Daniel Lazzari Jr.
>>
>> From cadc0d46f26ee77cfd0f0dd17fdff0938926b4cc Mon Sep 17 00:00:00 2001
>> From: dlazzari <dlazz...@dlazzari-linux.(none)>
>> Date: Fri, 9 Jul 2010 11:46:52 -0700
>> Subject: [PATCH] Fix the date= parameter in svn fetcher SRC_URIs
>>
>> ---
>>  lib/bb/fetch/__init__.py |    4 ++++
>>  lib/bb/fetch/svn.py      |    4 ++--
>>  2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py
>> index 31b9653..e8fec3d 100644
>> --- a/lib/bb/fetch/__init__.py
>> +++ b/lib/bb/fetch/__init__.py
>> @@ -590,6 +590,10 @@ class Fetch(object):
>>         if "srcdate" in urldata.parm:
>>             return urldata.parm['srcdate']
>>
>> +        if "date" in urldata.parm:
>> +            if urldata.parm['date'] != "now":
>> +                return urldata.parm['date']
>> +
>>         pn = data.getVar("PN", d, 1)
>>
>>         if pn:
>> diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py
>> index 375e8df..46f34ff 100644
>> --- a/lib/bb/fetch/svn.py
>> +++ b/lib/bb/fetch/svn.py
>> @@ -57,8 +57,8 @@ class Svn(Fetch):
>>         if 'rev' in ud.parm:
>>             ud.date = ""
>>             ud.revision = ud.parm['rev']
>> -        elif 'date' in ud.date:
>> -            ud.date = ud.parm['date']
>> +        elif 'date' in ud.parm:
>> +            ud.date = self.getSRCDate(ud, d)
>>             ud.revision = ""
>>         else:
>>             #
>> --
>> 1.6.0.4
>>
>> _______________________________________________
>> Bitbake-dev mailing list
>> [email protected]
>> https://lists.berlios.de/mailman/listinfo/bitbake-dev
>>
>
>
>
> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
>
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to