summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbake-dev/lib/bb/fetch/__init__.py6
-rw-r--r--bitbake-dev/lib/bb/fetch/git.py6
-rw-r--r--bitbake/lib/bb/fetch/__init__.py6
-rw-r--r--bitbake/lib/bb/fetch/git.py6
4 files changed, 16 insertions, 8 deletions
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py
index 429822bfa..b8a00107e 100644
--- a/bitbake-dev/lib/bb/fetch/__init__.py
+++ b/bitbake-dev/lib/bb/fetch/__init__.py
@@ -553,8 +553,12 @@ class Fetch(object):
"""
"""
+ has_sortable_valid = hasattr(self, "_sortable_revision_valid")
has_sortable = hasattr(self, "_sortable_revision")
- if has_sortable:
+
+ if has_sortable and not has_sortable_valid:
+ return self._sortable_revision(url, ud, d)
+ elif has_sortable and self._sortable_revision_valid(url, ud, d):
return self._sortable_revision(url, ud, d)
pd = persist_data.PersistData(d)
diff --git a/bitbake-dev/lib/bb/fetch/git.py b/bitbake-dev/lib/bb/fetch/git.py
index c81193774..911c5e437 100644
--- a/bitbake-dev/lib/bb/fetch/git.py
+++ b/bitbake-dev/lib/bb/fetch/git.py
@@ -145,12 +145,12 @@ class Git(Fetch):
def _build_revision(self, url, ud, d):
return ud.tag
- def _want_sortable_revision(self, url, ud, d):
+ def _sortable_revision_valid(self, url, ud, d):
return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False
- def _sortable_revision_disabled(self, url, ud, d):
+ def _sortable_revision(self, url, ud, d):
"""
- This is only called when _want_sortable_revision called true
+ This is only called when _sortable_revision_valid called true
We will have to get the updated revision.
"""
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 429822bfa..b8a00107e 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -553,8 +553,12 @@ class Fetch(object):
"""
"""
+ has_sortable_valid = hasattr(self, "_sortable_revision_valid")
has_sortable = hasattr(self, "_sortable_revision")
- if has_sortable:
+
+ if has_sortable and not has_sortable_valid:
+ return self._sortable_revision(url, ud, d)
+ elif has_sortable and self._sortable_revision_valid(url, ud, d):
return self._sortable_revision(url, ud, d)
pd = persist_data.PersistData(d)
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index c81193774..911c5e437 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -145,12 +145,12 @@ class Git(Fetch):
def _build_revision(self, url, ud, d):
return ud.tag
- def _want_sortable_revision(self, url, ud, d):
+ def _sortable_revision_valid(self, url, ud, d):
return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False
- def _sortable_revision_disabled(self, url, ud, d):
+ def _sortable_revision(self, url, ud, d):
"""
- This is only called when _want_sortable_revision called true
+ This is only called when _sortable_revision_valid called true
We will have to get the updated revision.
"""