<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 8 March 2017 at 17:25, Ross Burton <span dir="ltr">&lt;<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":17e" class="a3s aXjCH m15aaef3fa10343eb">+    d.setVar(&quot;S&quot;, &quot;${WORKDIR}/git&quot;)<br>+        d.setVar(&quot;PV&quot;, pv + &quot;+git${SRCPV}&quot;)</div></blockquote></div><br>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?</div><div class="gmail_extra"><br></div><div class="gmail_extra">So if someone had:</div><div class="gmail_extra"><br></div><div class="gmail_extra">BBCLASSEXTEND=&quot;devupstream:target&quot;</div><div class="gmail_extra">SRC_URI_class-devupstream = &quot;svn://some/svn/url&quot;</div><div class="gmail_extra"><br></div><div class="gmail_extra">You&#39;d get:</div><div class="gmail_extra"><br></div><div class="gmail_extra">S=${WORKDIR}/svn</div><div class="gmail_extra">PV=${PV}+svn${SRCPV}</div><div class="gmail_extra"><br></div><div class="gmail_extra">Annoyingly that breaks current behaviour as svn checkouts use the module name, whereas git clones just use &quot;git&quot; (and I can&#39;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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thoughts?  I don&#39;t want something to be merged which we rewrite in a months&#39; time...</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ross</div></div>