<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 <kweihmann@phoenixcontact.com><br>
Date: Mon, 14 Jan 2019 09:53:16 +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>
bitbake/lib/bb/fetch2/git.py | 14 +++++++++++---<br>
1 file changed, 11 insertions(+), 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>
+++ b/bitbake/lib/bb/fetch2/git.py<br>
@@ -611,11 +611,19 @@ class Git(FetchMethod):<br>
versions and returning the highest match.<br>
"""<br>
pupver = ('', '')<br>
+ output = None<br>
<br>
tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or "(?P<pver>([0-9][\.|_]?)+)")<br>
- try:<br>
- output = self._lsremote(ud, d, "refs/tags/*")<br>
- except (bb.fetch2.FetchError, bb.fetch2.NetworkAccess) as e:<br>
+ for needle in ["refs/tags/*", "refs/*"]:<br>
+ try:<br>
+ output = self._lsremote(ud, d, needle)<br>
+ break<br>
+ except (bb.fetch2.NetworkAccess) as e:<br>
+ bb.note("Could not list remote: %s" % str(e))<br>
+ return pupver<br>
+ except (bb.fetch2.FetchError) as e:<br>
+ pass<br>
+ if not output:<br>
bb.note("Could not list remote: %s" % str(e))<br>
return pupver<br>
<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 & 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>