<div dir="ltr">These don&#39;t actually work, v2 incoming.<div><br></div><div>Ross</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 November 2015 at 18:44, 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">To avoid false positives such as a SRC_URI for <a href="http://foo.xz/foo.zip" rel="noreferrer" target="_blank">http://foo.xz/foo.zip</a> gaining a<br>
dependnecy on xz-native decode the URI so that precise tests can be done.<br>
<br>
Signed-off-by: Ross Burton &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt;<br>
---<br>
 meta/classes/base.bbclass | 25 ++++++++++++-------------<br>
 1 file changed, 12 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass<br>
index eb5edef..c7db81a 100644<br>
--- a/meta/classes/base.bbclass<br>
+++ b/meta/classes/base.bbclass<br>
@@ -527,38 +527,37 @@ python () {<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â bb.note(&quot;INCLUDING &quot; + pn + &quot; as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS&quot;)<br>
<br>
  Â  Â srcuri = d.getVar(&#39;SRC_URI&#39;, True)<br>
+  Â  (scheme, _ , path) = bb.fetch.decodeurl(srcuri)[:3]<br>
  Â  Â # Svn packages should DEPEND on subversion-native<br>
-  Â  if &quot;svn://&quot; in srcuri:<br>
+  Â  if scheme == &quot;svn&quot;:<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_fetch&#39;, &#39;depends&#39;, &#39; subversion-native:do_populate_sysroot&#39;)<br>
<br>
  Â  Â # Git packages should DEPEND on git-native<br>
-  Â  if &quot;git://&quot; in srcuri:<br>
+  Â  elif scheme == &quot;git&quot;:<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_fetch&#39;, &#39;depends&#39;, &#39; git-native:do_populate_sysroot&#39;)<br>
<br>
  Â  Â # Mercurial packages should DEPEND on mercurial-native<br>
-  Â  elif &quot;hg://&quot; in srcuri:<br>
+  Â  elif scheme == &quot;hg&quot;:<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_fetch&#39;, &#39;depends&#39;, &#39; mercurial-native:do_populate_sysroot&#39;)<br>
<br>
  Â  Â # OSC packages should DEPEND on osc-native<br>
-  Â  elif &quot;osc://&quot; in srcuri:<br>
+  Â  elif scheme == &quot;osc&quot;<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_fetch&#39;, &#39;depends&#39;, &#39; osc-native:do_populate_sysroot&#39;)<br>
<br>
-  Â  # *.lz4 should depends on lz4-native for unpacking<br>
-  Â  # Not endswith because of &quot;*.patch.lz4;patch=1&quot;. Need bb.fetch.decodeurl in future<br>
-  Â  if &#39;.lz4&#39; in srcuri:<br>
+  Â  # *.lz4 should DEPEND on lz4-native for unpacking<br>
+  Â  if path.endswith(&#39;.lz4&#39;):<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_unpack&#39;, &#39;depends&#39;, &#39; lz4-native:do_populate_sysroot&#39;)<br>
<br>
-  Â  # *.xz should depends on xz-native for unpacking<br>
-  Â  # Not endswith because of &quot;*.patch.xz;patch=1&quot;. Need bb.fetch.decodeurl in future<br>
-  Â  if &#39;.xz&#39; in srcuri:<br>
+  Â  # *.xz should DEPEND on xz-native for unpacking<br>
+  Â  elif path.endswith(&#39;.xz&#39;):<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_unpack&#39;, &#39;depends&#39;, &#39; xz-native:do_populate_sysroot&#39;)<br>
<br>
-  Â  # unzip-native should already be staged before unpacking ZIP recipes<br>
-  Â  if &quot;.zip&quot; in srcuri:<br>
+  Â  # .zip should DEPEND on unzip-native for unpacking<br>
+  Â  elif path.endswith(&#39;.zip&#39;):<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_unpack&#39;, &#39;depends&#39;, &#39; unzip-native:do_populate_sysroot&#39;)<br>
<br>
  Â  Â # file is needed by rpm2cpio.sh<br>
-  Â  if &quot;.src.rpm&quot; in srcuri:<br>
+  Â  elif path.endswith(&#39;.src.rpm&#39;):<br>
  Â  Â  Â  Â d.appendVarFlag(&#39;do_unpack&#39;, &#39;depends&#39;, &#39; file-native:do_populate_sysroot&#39;)<br>
<br>
  Â  Â set_packagetriplet(d)<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.4.9 (Apple Git-60)<br>
<br>
</font></span></blockquote></div><br></div>