diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-21 14:47:27 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-22 13:57:04 +0000 |
commit | 2b8761e5fc0cbef8e43a2246450098e9b48413c0 (patch) | |
tree | f86f5af3b77b7a4f6ffe3443bade03832ee9ed79 | |
parent | 7eef95d723a14d9394afee282bab1eed4f83c778 (diff) | |
download | poky-2b8761e5fc0cbef8e43a2246450098e9b48413c0.tar.gz |
bitbake: fetch2: Rename __BBSEENSRCREV -> __BBSRCREV_SEEN
For readability of following patches, rename this internal variable to
allow for others in a similar format.
(Bitbake rev: 450b4a00895ed1f9396a8ff859dc1cc0eccc838f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index cf65727a20..3b96849a25 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -769,7 +769,7 @@ def get_srcrev(d, method_name='sortable_revision'): | |||
769 | that fetcher provides a method with the given name and the same signature as sortable_revision. | 769 | that fetcher provides a method with the given name and the same signature as sortable_revision. |
770 | """ | 770 | """ |
771 | 771 | ||
772 | d.setVar("__BBSEENSRCREV", "1") | 772 | d.setVar("__BBSRCREV_SEEN", "1") |
773 | recursion = d.getVar("__BBINSRCREV") | 773 | recursion = d.getVar("__BBINSRCREV") |
774 | if recursion: | 774 | if recursion: |
775 | raise FetchError("There are recursive references in fetcher variables, likely through SRC_URI") | 775 | 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 5bb8393133..66c2a7e540 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -733,7 +733,7 @@ class Git(FetchMethod): | |||
733 | """ | 733 | """ |
734 | Compute the HEAD revision for the url | 734 | Compute the HEAD revision for the url |
735 | """ | 735 | """ |
736 | if not d.getVar("__BBSEENSRCREV"): | 736 | if not d.getVar("__BBSRCREV_SEEN"): |
737 | raise bb.fetch2.FetchError("Recipe uses a floating tag/branch '%s' for repo '%s' without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev() (use SRCPV in PV for OE)." % (ud.unresolvedrev[name], ud.host+ud.path)) | 737 | raise bb.fetch2.FetchError("Recipe uses a floating tag/branch '%s' for repo '%s' without a fixed SRCREV yet doesn't call bb.fetch2.get_srcrev() (use SRCPV in PV for OE)." % (ud.unresolvedrev[name], ud.host+ud.path)) |
738 | 738 | ||
739 | # Ensure we mark as not cached | 739 | # Ensure we mark as not cached |
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 1533d52b1e..2e5b404d95 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -785,7 +785,7 @@ class FetcherLocalTest(FetcherTest): | |||
785 | 785 | ||
786 | # Fetch and check revision | 786 | # Fetch and check revision |
787 | self.d.setVar("SRCREV", "AUTOINC") | 787 | self.d.setVar("SRCREV", "AUTOINC") |
788 | self.d.setVar("__BBSEENSRCREV", "1") | 788 | self.d.setVar("__BBSRCREV_SEEN", "1") |
789 | url = "git://" + self.gitdir + ";branch=master;protocol=file;" + suffix | 789 | url = "git://" + self.gitdir + ";branch=master;protocol=file;" + suffix |
790 | fetcher = bb.fetch.Fetch([url], self.d) | 790 | fetcher = bb.fetch.Fetch([url], self.d) |
791 | fetcher.download() | 791 | fetcher.download() |
@@ -1654,7 +1654,7 @@ class GitShallowTest(FetcherTest): | |||
1654 | self.d.setVar('BB_GIT_SHALLOW', '1') | 1654 | self.d.setVar('BB_GIT_SHALLOW', '1') |
1655 | self.d.setVar('BB_GENERATE_MIRROR_TARBALLS', '0') | 1655 | self.d.setVar('BB_GENERATE_MIRROR_TARBALLS', '0') |
1656 | self.d.setVar('BB_GENERATE_SHALLOW_TARBALLS', '1') | 1656 | self.d.setVar('BB_GENERATE_SHALLOW_TARBALLS', '1') |
1657 | self.d.setVar("__BBSEENSRCREV", "1") | 1657 | self.d.setVar("__BBSRCREV_SEEN", "1") |
1658 | 1658 | ||
1659 | def assertRefs(self, expected_refs, cwd=None): | 1659 | def assertRefs(self, expected_refs, cwd=None): |
1660 | if cwd is None: | 1660 | if cwd is None: |
@@ -2218,7 +2218,7 @@ class GitLfsTest(FetcherTest): | |||
2218 | 2218 | ||
2219 | self.d.setVar('SRCREV', '${AUTOREV}') | 2219 | self.d.setVar('SRCREV', '${AUTOREV}') |
2220 | self.d.setVar('AUTOREV', '${@bb.fetch2.get_autorev(d)}') | 2220 | self.d.setVar('AUTOREV', '${@bb.fetch2.get_autorev(d)}') |
2221 | self.d.setVar("__BBSEENSRCREV", "1") | 2221 | self.d.setVar("__BBSRCREV_SEEN", "1") |
2222 | 2222 | ||
2223 | bb.utils.mkdirhier(self.srcdir) | 2223 | bb.utils.mkdirhier(self.srcdir) |
2224 | self.git_init(cwd=self.srcdir) | 2224 | self.git_init(cwd=self.srcdir) |
@@ -2936,7 +2936,7 @@ class GitSharedTest(FetcherTest): | |||
2936 | super(GitSharedTest, self).setUp() | 2936 | super(GitSharedTest, self).setUp() |
2937 | self.recipe_url = "git://git.openembedded.org/bitbake;branch=master" | 2937 | self.recipe_url = "git://git.openembedded.org/bitbake;branch=master" |
2938 | self.d.setVar('SRCREV', '82ea737a0b42a8b53e11c9cde141e9e9c0bd8c40') | 2938 | self.d.setVar('SRCREV', '82ea737a0b42a8b53e11c9cde141e9e9c0bd8c40') |
2939 | self.d.setVar("__BBSEENSRCREV", "1") | 2939 | self.d.setVar("__BBSRCREV_SEEN", "1") |
2940 | 2940 | ||
2941 | @skipIfNoNetwork() | 2941 | @skipIfNoNetwork() |
2942 | def test_shared_unpack(self): | 2942 | def test_shared_unpack(self): |