diff options
| -rw-r--r-- | bitbake-dev/lib/bb/fetch/__init__.py | 6 | ||||
| -rw-r--r-- | bitbake-dev/lib/bb/fetch/git.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/fetch/git.py | 6 |
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 429822bfa9..b8a00107e2 100644 --- a/bitbake-dev/lib/bb/fetch/__init__.py +++ b/bitbake-dev/lib/bb/fetch/__init__.py | |||
| @@ -553,8 +553,12 @@ class Fetch(object): | |||
| 553 | """ | 553 | """ |
| 554 | 554 | ||
| 555 | """ | 555 | """ |
| 556 | has_sortable_valid = hasattr(self, "_sortable_revision_valid") | ||
| 556 | has_sortable = hasattr(self, "_sortable_revision") | 557 | has_sortable = hasattr(self, "_sortable_revision") |
| 557 | if has_sortable: | 558 | |
| 559 | if has_sortable and not has_sortable_valid: | ||
| 560 | return self._sortable_revision(url, ud, d) | ||
| 561 | elif has_sortable and self._sortable_revision_valid(url, ud, d): | ||
| 558 | return self._sortable_revision(url, ud, d) | 562 | return self._sortable_revision(url, ud, d) |
| 559 | 563 | ||
| 560 | pd = persist_data.PersistData(d) | 564 | pd = persist_data.PersistData(d) |
diff --git a/bitbake-dev/lib/bb/fetch/git.py b/bitbake-dev/lib/bb/fetch/git.py index c811937743..911c5e437f 100644 --- a/bitbake-dev/lib/bb/fetch/git.py +++ b/bitbake-dev/lib/bb/fetch/git.py | |||
| @@ -145,12 +145,12 @@ class Git(Fetch): | |||
| 145 | def _build_revision(self, url, ud, d): | 145 | def _build_revision(self, url, ud, d): |
| 146 | return ud.tag | 146 | return ud.tag |
| 147 | 147 | ||
| 148 | def _want_sortable_revision(self, url, ud, d): | 148 | def _sortable_revision_valid(self, url, ud, d): |
| 149 | return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False | 149 | return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False |
| 150 | 150 | ||
| 151 | def _sortable_revision_disabled(self, url, ud, d): | 151 | def _sortable_revision(self, url, ud, d): |
| 152 | """ | 152 | """ |
| 153 | This is only called when _want_sortable_revision called true | 153 | This is only called when _sortable_revision_valid called true |
| 154 | 154 | ||
| 155 | We will have to get the updated revision. | 155 | We will have to get the updated revision. |
| 156 | """ | 156 | """ |
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 429822bfa9..b8a00107e2 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
| @@ -553,8 +553,12 @@ class Fetch(object): | |||
| 553 | """ | 553 | """ |
| 554 | 554 | ||
| 555 | """ | 555 | """ |
| 556 | has_sortable_valid = hasattr(self, "_sortable_revision_valid") | ||
| 556 | has_sortable = hasattr(self, "_sortable_revision") | 557 | has_sortable = hasattr(self, "_sortable_revision") |
| 557 | if has_sortable: | 558 | |
| 559 | if has_sortable and not has_sortable_valid: | ||
| 560 | return self._sortable_revision(url, ud, d) | ||
| 561 | elif has_sortable and self._sortable_revision_valid(url, ud, d): | ||
| 558 | return self._sortable_revision(url, ud, d) | 562 | return self._sortable_revision(url, ud, d) |
| 559 | 563 | ||
| 560 | pd = persist_data.PersistData(d) | 564 | pd = persist_data.PersistData(d) |
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index c811937743..911c5e437f 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py | |||
| @@ -145,12 +145,12 @@ class Git(Fetch): | |||
| 145 | def _build_revision(self, url, ud, d): | 145 | def _build_revision(self, url, ud, d): |
| 146 | return ud.tag | 146 | return ud.tag |
| 147 | 147 | ||
| 148 | def _want_sortable_revision(self, url, ud, d): | 148 | def _sortable_revision_valid(self, url, ud, d): |
| 149 | return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False | 149 | return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False |
| 150 | 150 | ||
| 151 | def _sortable_revision_disabled(self, url, ud, d): | 151 | def _sortable_revision(self, url, ud, d): |
| 152 | """ | 152 | """ |
| 153 | This is only called when _want_sortable_revision called true | 153 | This is only called when _sortable_revision_valid called true |
| 154 | 154 | ||
| 155 | We will have to get the updated revision. | 155 | We will have to get the updated revision. |
| 156 | """ | 156 | """ |
