summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 39dfd474b3..df33fb6aeb 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -833,6 +833,7 @@ class Git(FetchMethod):
833 bb.note("Could not list remote: %s" % str(e)) 833 bb.note("Could not list remote: %s" % str(e))
834 return pupver 834 return pupver
835 835
836 rev_tag_re = re.compile(r"([0-9a-f]{40})\s+refs/tags/(.*)")
836 pver_re = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or r"(?P<pver>([0-9][\.|_]?)+)") 837 pver_re = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or r"(?P<pver>([0-9][\.|_]?)+)")
837 nonrel_re = re.compile(r"(alpha|beta|rc|final)+") 838 nonrel_re = re.compile(r"(alpha|beta|rc|final)+")
838 839
@@ -841,7 +842,12 @@ class Git(FetchMethod):
841 if not line: 842 if not line:
842 break 843 break
843 844
844 tag = line.split("/")[-1] 845 m = rev_tag_re.match(line)
846 if not m:
847 continue
848
849 (revision, tag) = m.groups()
850
845 # Ignore non-released branches 851 # Ignore non-released branches
846 if nonrel_re.search(tag): 852 if nonrel_re.search(tag):
847 continue 853 continue
@@ -857,7 +863,6 @@ class Git(FetchMethod):
857 continue 863 continue
858 864
859 verstring = pver 865 verstring = pver
860 revision = line.split()[0]
861 pupver = (verstring, revision) 866 pupver = (verstring, revision)
862 867
863 return pupver 868 return pupver