summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-18 11:04:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-19 11:46:30 +0000
commit18a533bfe6d4d5020c0252f9aecf6fc4abda672e (patch)
treef59f92b430d1f39fcdb250927314e11d9e715051 /bitbake/lib/bb/tests/fetch.py
parente8e34a04ce283bd41591dcc6ae8d6e8094d489e0 (diff)
downloadpoky-18a533bfe6d4d5020c0252f9aecf6fc4abda672e.tar.gz
bitbake: fetch/git: Rework tag parameter handling
Currently bitbake disallows tag parameters along with revision parameters. This isn't great since quite often, we'd like to verify that a given revision does match some tag. At the same time we don't want to or need to access the network to verify this, which normally a tag would require. Rework the code so that tag and revisions can both be specified together. Verify that any tag specified matches the revision in use at unpack time. This means we can start requiring people to put tags in git SRC_URIs when revisions are used, making review a little easier that it isn't some random revision. The test that is dropped looks like a different test but the comment is a copy and paste error. The SRCREV/rev mismatch test remains, this removes the rev and tag set test. (Bitbake rev: d591d7633fe8d739ec00395920e44910b0b77e27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index cd81660b1b..b4e9255578 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -1087,12 +1087,6 @@ class FetcherNetworkTest(FetcherTest):
1087 self.assertRaises(bb.fetch.FetchError, self.gitfetcher, url1, url2) 1087 self.assertRaises(bb.fetch.FetchError, self.gitfetcher, url1, url2)
1088 1088
1089 @skipIfNoNetwork() 1089 @skipIfNoNetwork()
1090 def test_gitfetch_tagandrev(self):
1091 # SRCREV is set but does not match rev= parameter
1092 url1 = url2 = "git://git.openembedded.org/bitbake;rev=270a05b0b4ba0959fe0624d2a4885d7b70426da5;tag=270a05b0b4ba0959fe0624d2a4885d7b70426da5;protocol=https;branch=master"
1093 self.assertRaises(bb.fetch.FetchError, self.gitfetcher, url1, url2)
1094
1095 @skipIfNoNetwork()
1096 def test_gitfetch_usehead(self): 1090 def test_gitfetch_usehead(self):
1097 # Since self.gitfetcher() sets SRCREV we expect this to override 1091 # Since self.gitfetcher() sets SRCREV we expect this to override
1098 # `usehead=1' and instead fetch the specified SRCREV. See 1092 # `usehead=1' and instead fetch the specified SRCREV. See