[OE-core] [PATCH] classes: add gitupstream class

Burton, Ross ross.burton at intel.com
Thu Mar 9 12:38:01 UTC 2017


On 8 March 2017 at 17:25, Ross Burton <ross.burton at intel.com> wrote:

> +    d.setVar("S", "${WORKDIR}/git")
> +        d.setVar("PV", pv + "+git${SRCPV}")
>

I guess these are the only two lines which are git-specific.  Would it be
sensible to be VCS-agnostic and simply look at the protocol of the first
entry in SRC_URI?

So if someone had:

BBCLASSEXTEND="devupstream:target"
SRC_URI_class-devupstream = "svn://some/svn/url"

You'd get:

S=${WORKDIR}/svn
PV=${PV}+svn${SRCPV}

Annoyingly that breaks current behaviour as svn checkouts use the module
name, whereas git clones just use "git" (and I can't remember why that is).
The class could look at the SRC_URI further: for git set SRC_URI to
WORKDIR/git, for svn set WORKDIR/{module name}.  Also current practise is
+svnr{SRCPV} not +svn, so that could either be special-cased again or
ignored.

Thoughts?  I don't want something to be merged which we rewrite in a
months' time...

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170309/846dd459/attachment-0002.html>


More information about the Openembedded-core mailing list