[oe] git & SRCREV

Martin Jansa martin.jansa at gmail.com
Mon Oct 11 11:52:50 UTC 2010


On Mon, Oct 11, 2010 at 12:49:03PM +0100, Graeme Gregory wrote:
>  On 11/10/2010 12:47, Graeme Gregory wrote:
> >  On 11/10/2010 12:45, Frans Meulenbroeks wrote:
> >> Roughly once a week i see a question on irc about someone getting a
> >> git error: "fatal: not a valid object name 1"
> >> this is because SRCREV is not defined for e.g. that machine.
> >> What about extending bitbake (guess it is in there) with an error
> >> message that more clearly explains the problem?
> >>
> > As 1 can never be valid for git, how about a if SRCREV==1 then exlode in
> > git.bbclass
> >
> Of course I meant the git class in the fetcher in bitbake :-)

if you want it to explode then you can use:

diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index c1a65e2c..f7a876d 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -579,7 +579,7 @@ UPDATECOMMAND = "ERROR, this must be a BitBake bug"
 UPDATECOMMAND_cvs = "/usr/bin/env 'PATH=${PATH}' cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
 UPDATECOMMAND_svn = "/usr/bin/env svn update --non-interactive --trust-server-cert --force --accept theirs-full ${SVNCOOPTS}"
 SRCDATE = "${DATE}"
-SRCREV = "1"
+SRCREV = "INVALID"
 SRCPV = "${@bb.fetch.get_srcrev(d)}"
 AUTOREV = "${SRCPV}"

problem is that you'll get lots of
NOTE: Handling BitBake files: / (6820/7151) [95 %]ERROR: Please set SRCREV to a valid value while parsing /OE/dev/recipes/pimlico/contacts_svn.bb
NOTE: <class 'bb.fetch.InvalidSRCREV'>:Please set SRCREV to a valid value while evaluating:
${@bb.fetch.get_srcrev(d)}
NOTE: <class 'bb.fetch.InvalidSRCREV'>:Please set SRCREV to a valid value while evaluating:
0.8+svnr${SRCPV}
NOTE: <class 'bb.fetch.InvalidSRCREV'>:Please set SRCREV to a valid value while evaluating:
${PN}-${EXTENDPE}${PV}-${PR}
NOTE: <class 'bb.fetch.InvalidSRCREV'>:Please set SRCREV to a valid value while evaluating:
${PF}:${P}:${PN}:${BP}:${BPN}:files:.
ERROR: Please set SRCREV to a valid value while parsing /OE/dev/recipes/pimlico/contacts_svn.bb

even for recipes not in your target RDEPENDS..

regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com




More information about the Openembedded-devel mailing list