<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<div>From 26811e557b963c87ffbcb3448401561ab87751d3 Mon Sep 17 00:00:00 2001<br>
From: Konrad Weihmann &lt;kweihmann@phoenixcontact.com&gt;<br>
Date: Mon, 14 Jan 2019 09:53:16 &#43;0100<br>
Subject: [PATCH] fetch2: probe for branches on version check<br>
<br>
If a repository isn't using tags but versioned branches,<br>
bb.fetch2.git.latest_version will fail.<br>
To get at least some kind of information probe for git-tags first and<br>
then for git-branches before giving up.<br>
---<br>
&nbsp;bitbake/lib/bb/fetch2/git.py | 14 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;---<br>
&nbsp;1 file changed, 11 insertions(&#43;), 3 deletions(-)<br>
<br>
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py<br>
index 15858a6241..5cc1fce531 100644<br>
--- a/bitbake/lib/bb/fetch2/git.py<br>
&#43;&#43;&#43; b/bitbake/lib/bb/fetch2/git.py<br>
@@ -611,11 &#43;611,19 @@ class Git(FetchMethod):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; versions and returning the highest match.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pupver = ('', '')<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output = None<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or &quot;(?P&lt;pver&gt;([0-9][\.|_]?)&#43;)&quot;)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try:<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output = self._lsremote(ud, d, &quot;refs/tags/*&quot;)<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; except (bb.fetch2.FetchError, bb.fetch2.NetworkAccess) as e:<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for needle in [&quot;refs/tags/*&quot;, &quot;refs/*&quot;]:<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try:<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output = self._lsremote(ud, d, needle)<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; except (bb.fetch2.NetworkAccess) as e:<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bb.note(&quot;Could not list remote: %s&quot; % str(e))<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return pupver<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; except (bb.fetch2.FetchError) as e:<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pass<br>
&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not output:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bb.note(&quot;Could not list remote: %s&quot; % str(e))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return pupver<br>
&nbsp;<br>
-- <br>
2.14.2<br>
<br>
</div>
<br>
<p></p>
</div>
<FONT face="Arial" size="1">
<P dir="ltr"><BR>..................................................................<BR>Phoenix Contact GmbH &amp; Co. KG<BR><BR>Sitz der Gesellschaft / registered office of the company: 32825 Blomberg<BR>USt-Id-Nr.: DE124613250<BR>Pers. haftende Gesellschafterin / personally liable partner: Phoenix Contact Verwaltungs GmbH<BR>Amtsgericht Lemgo HRB 5273 / district court Lemgo HRB 5273<BR>Kom. Ges. Amtsgericht Lemgo HRA 3746 / limited commercial partnership district court Lemgo HRA 3746 </P>
<P>Geschäftsführer / Executive Board: Frank Stührenberg (Vorsitzender / Chief Executive Officer), Roland Bent, Prof. Dr. Gunther Olesch, Axel Wachholz <BR>___________________________________________________________________<BR>Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren, jegliche anderweitige Verwendung sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.<BR>----------------------------------------------------------------------------------------------------<BR>This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.<BR>___________________________________________________________________</P></FONT></FONT></body>
</html>