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

Richard Purdie richard.purdie at linuxfoundation.org
Thu Mar 9 13:03:38 UTC 2017


On Thu, 2017-03-09 at 12:38 +0000, Burton, Ross wrote:
> 
> 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...

I worry that making it support generic scms may make it fragile and
hard to extend if we do end up needing to do scm specific work in here
so I'm torn. Having a class per scm would also be annoying...

Cheers,

Richard



More information about the Openembedded-core mailing list