All of lore.kernel.org
 help / color / mirror / Atom feed
* how to use AUTOREV for a SVN repo in oe-core?
@ 2011-08-26  2:56 Cliff Brake
  2011-08-30 21:16 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Cliff Brake @ 2011-08-26  2:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hello,

I'm trying to figure out how AUTOREV is supposed to work these days
with oe-core.  In the past, I would do something like:

SRCREV = "${AUTOREV}"
PV = "1.0+svnr${SRCREV}"

in my custom application recipes to always build the head of a SVN repo.

In OE classic, we have:

SRCPV = "${@bb.fetch.get_srcrev(d)}"
AUTOREV = "${SRCPV}"

In oe-core, we have:

AUTOREV = "${@bb.fetch2.get_autorev(d)}"
SRCPV = "${@bb.fetch2.get_srcrev(d)}"

in bitbake, we have:

def get_autorev(d):
    #  only not cache src rev in autorev case
    if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
        bb.data.setVar('__BB_DONT_CACHE', '1', d)
    return "AUTOINC"

def get_srcrev(d):
    """
    Return the version string for the current package
    (usually to be used as PV)
    Most packages usually only have one SCM so we just pass on the call.
    In the multi SCM case, we build a value based on SRCREV_FORMAT which must
    have been set.
    """

    scms = []
    fetcher = Fetch( ....

Therefore, I get package names like the following with oe-core:

svs_1.0+svnrAUTOINC-r4_armv5te.ipk

In the OE classic days, AUTOINC would be replaced with the SVN revision.

And if I check in new changes to the SVN project, it does not rebuild.

What is the recommended way to create a recipe that always builds the
tip of source in a SVN repo?

Its interesting there is a change in oe-core from Feb 13 that switched
from fetch to fetch2:

commit a26163b8f5fc682e6ee4d597e5dd487485b180f5
Author: Saul Wold <sgw@linux.intel.com>
Date:   Sun Feb 13 23:57:59 2011 -0800

    bitbake.conf: change revision fetching to use newer fetch2 code

    Signed-off-by: Saul Wold <sgw@linux.intel.com>

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index da50fe5..162c792 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -560,8 +560,8 @@ UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT}
update -d -P ${CVSCOOPTS}"
 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
 SRCDATE = "${DATE}"
 SRCREV = "INVALID"
-AUTOREV = "${@bb.fetch.get_autorev(d)}"
-SRCPV = "${@bb.fetch.get_srcrev(d)}"
+AUTOREV = "${@bb.fetch2.get_autorev(d)}"
+SRCPV = "${@bb.fetch2.get_srcrev(d)}"

 SRC_URI = "file://${FILE}"

and the corresponding functions in fetch are:

def get_autorev(d):
    return get_srcrev(d)

def get_srcrev(d):
   ....

So, before the above change, I would expect the OE classic behavior in oe-core.

Thanks,
Cliff



-- 
=================
http://bec-systems.com



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: how to use AUTOREV for a SVN repo in oe-core?
  2011-08-26  2:56 how to use AUTOREV for a SVN repo in oe-core? Cliff Brake
@ 2011-08-30 21:16 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2011-08-30 21:16 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, 2011-08-25 at 22:56 -0400, Cliff Brake wrote:
> Hello,
> 
> I'm trying to figure out how AUTOREV is supposed to work these days
> with oe-core.  In the past, I would do something like:
> 
> SRCREV = "${AUTOREV}"
> PV = "1.0+svnr${SRCREV}"
> 
> in my custom application recipes to always build the head of a SVN repo.

You need to do:

PV = "1.0+svnr${SRCPV}"

which should make all the difference!

Cheers,

Richard






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-30 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26  2:56 how to use AUTOREV for a SVN repo in oe-core? Cliff Brake
2011-08-30 21:16 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.