summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 684e83dcad..95f0d9d553 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -759,12 +759,11 @@ class Fetch(object):
759 pd = bb.persist_data.persist(d) 759 pd = bb.persist_data.persist(d)
760 revs = pd['BB_URI_HEADREVS'] 760 revs = pd['BB_URI_HEADREVS']
761 key = self.generate_revision_key(url, ud, d) 761 key = self.generate_revision_key(url, ud, d)
762 rev = revs[key] 762 try:
763 if rev != None: 763 return revs[key]
764 return str(rev) 764 except KeyError:
765 765 revs[key] = rev = self._latest_revision(url, ud, d)
766 revs[key] = rev = self._latest_revision(url, ud, d) 766 return rev
767 return rev
768 767
769 def sortable_revision(self, url, ud, d): 768 def sortable_revision(self, url, ud, d):
770 """ 769 """
@@ -778,13 +777,13 @@ class Fetch(object):
778 key = self.generate_revision_key(url, ud, d) 777 key = self.generate_revision_key(url, ud, d)
779 778
780 latest_rev = self._build_revision(url, ud, d) 779 latest_rev = self._build_revision(url, ud, d)
781 last_rev = localcounts[key + '_rev'] 780 last_rev = localcounts.get(key + '_rev')
782 uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False 781 uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False
783 count = None 782 count = None
784 if uselocalcount: 783 if uselocalcount:
785 count = Fetch.localcount_internal_helper(ud, d) 784 count = Fetch.localcount_internal_helper(ud, d)
786 if count is None: 785 if count is None:
787 count = localcounts[key + '_count'] 786 count = localcounts.get(key + '_count')
788 787
789 if last_rev == latest_rev: 788 if last_rev == latest_rev:
790 return str(count + "+" + latest_rev) 789 return str(count + "+" + latest_rev)