diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 28a3e54c7f..d099cd1092 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -765,6 +765,7 @@ def get_srcrev(d, method_name='sortable_revision'): | |||
765 | that fetcher provides a method with the given name and the same signature as sortable_revision. | 765 | that fetcher provides a method with the given name and the same signature as sortable_revision. |
766 | """ | 766 | """ |
767 | 767 | ||
768 | d.setVar("__BBSEENSRCREV", "1") | ||
768 | recursion = d.getVar("__BBINSRCREV") | 769 | recursion = d.getVar("__BBINSRCREV") |
769 | if recursion: | 770 | if recursion: |
770 | raise FetchError("There are recursive references in fetcher variables, likely through SRC_URI") | 771 | raise FetchError("There are recursive references in fetcher variables, likely through SRC_URI") |
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 30da8e95b7..836ef1c49a 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -727,6 +727,12 @@ class Git(FetchMethod): | |||
727 | """ | 727 | """ |
728 | Compute the HEAD revision for the url | 728 | Compute the HEAD revision for the url |
729 | """ | 729 | """ |
730 | if not d.getVar("__BBSEENSRCREV"): | ||
731 | raise bb.fetch2.FetchError("Recipe uses a floating tag/branch without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev() (use SRCPV in PV for OE).") | ||
732 | |||
733 | # Ensure we mark as not cached | ||
734 | bb.fetch2.get_autorev(d) | ||
735 | |||
730 | output = self._lsremote(ud, d, "") | 736 | output = self._lsremote(ud, d, "") |
731 | # Tags of the form ^{} may not work, need to fallback to other form | 737 | # Tags of the form ^{} may not work, need to fallback to other form |
732 | if ud.unresolvedrev[name][:5] == "refs/" or ud.usehead: | 738 | if ud.unresolvedrev[name][:5] == "refs/" or ud.usehead: |