<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 7:28 AM, Christopher Larson <span dir="ltr">&lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.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 class="adM"><div class="h5"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 1:45 AM, Martin Jansa <span dir="ltr">&lt;<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.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><div>On Fri, Aug 14, 2015 at 08:57:17AM -0700, Christopher Larson wrote:<br>
&gt; On Thu, Aug 13, 2015 at 4:46 PM, Christopher Larson &lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; &gt; From: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com" target="_blank">chris_larson@mentor.com</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt; Please review the following changes for suitability for inclusion. If you<br>
&gt; &gt; have<br>
&gt; &gt; any objections or suggestions for improvement, please respond to the<br>
&gt; &gt; patches. If<br>
&gt; &gt; you agree with the changes, please provide your Acked-by.<br>
&gt; &gt;<br>
&gt; &gt; This only implements support for shallow mirror tarballs, not shallow<br>
&gt; &gt; clones.<br>
&gt; &gt;<br>
&gt; &gt; The mirror tarball filename includes branch, revision, and depth. To<br>
&gt; &gt; enable,<br>
&gt; &gt; use the `BB_GIT_SHALLOW` variable, or `BB_GIT_SHALLOW_&lt;name&gt;` for specific<br>
&gt; &gt; URLs. This variable can hold either a clone depth (e.g. `1` to just get<br>
&gt; &gt; SRCREV), or a ref or commit, in which case we keep history up to that<br>
&gt; &gt; commit.<br>
&gt; &gt;<br>
&gt; &gt; The shallow support will not, at this time, function correctly for<br>
&gt; &gt; linux-yocto, due to its branching scheme &amp; validation.<br>
&gt; &gt;<br>
&gt; &gt; Example:<br>
&gt; &gt;<br>
&gt; &gt;     BB_GIT_SHALLOW ?= &quot;1&quot;<br>
&gt; &gt;     BB_GIT_SHALLOW_pn-linux-yocto = &quot;&quot;<br>
&gt; &gt;     BB_GIT_SHALLOW_pn-linux-mel_mx6 = &quot;v3.14&quot;<br>
&gt; &gt;     BB_GIT_SHALLOW_pn-testrepo = &quot;testbranch&quot;<br>
&gt; &gt;<br>
&gt; &gt; This implementation will attempt to fetch a full mirror tarball if it was<br>
&gt; &gt; unable to fetch a shallow tarball. If `BB_GIT_SHALLOW` and<br>
&gt; &gt; `BB_GENERATE_MIRROR_TARBALLS` are enabled for a given recipe, a shallow<br>
&gt; &gt; tarball will be emitted.<br>
<br>
</div></div>It would be nice to describe what this implementation does when there is<br>
some local git clone already (will it first try to update it with &quot;git fetch&quot;<br>
or download shallow tarball?)</blockquote></div><br></div></div>In that case, I believe it will update the clone and use that, unless we have a current tarball already downloaded, but I&#39;ll double check the logic and get back to you.</blockquote></div><br>I was correct about the behavioral inconsistency of the current implementation -- if both existed, localpath was returning the mirror tarball, needs_update was returning false regardless of the state of the clone, and then unpack would unpack the out of date clone instead of the tarball :) Not ideal, obviously -- either we prefer a shallow tarball to a clone or vice versa, not somewhere in-between. I&#39;m fixing that now.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think that since the clone is essentially a superset (or should be) of the clone tarball, it should probably be preferred when both are around, but I&#39;m open to opinions on that.</div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>