Message ID | 20230118072808.5895-1-pavel@zhukoff.net |
---|---|
State | Accepted, archived |
Commit | 1a21918049091a6d77426dbf8868ffdc14ba1003 |
Headers | show |
Series | fetch2/tests: Add parameter to recipe_uri | expand |
Hi Pavel,
On 1/18/23 08:28, Pavel Zhukov wrote:
> While the parameter is not required it allows testing of possible
I was convinced it was required for a year already but no :)
I see Richard added a warning in Bitbake when the branch parameter is
missing and nobranch is not set to 1, c.f.
https://git.openembedded.org/bitbake/commit/?id=86a9c26828479be55865bcce72bcc7e12b93caa7
Maybe it's time we make this a fail?
Cheers,
Quentin
Quentin Schulz <quentin.schulz@theobroma-systems.com> writes: > Hi Pavel, Hi Quentin! > > On 1/18/23 08:28, Pavel Zhukov wrote: >> While the parameter is not required it allows testing of possible > > I was convinced it was required for a year already but no :) > > I see Richard added a warning in Bitbake when the branch parameter is > missing and nobranch is not set to 1, > c.f. https://git.openembedded.org/bitbake/commit/?id=86a9c26828479be55865bcce72bcc7e12b93caa7 Right, I saw this warning in the past but not this time... Anyway at the scope of this patch branch parameter can be changed with any other (rebaseable,bareclone etc) parameter git fetcher accpes. branch one is just first that came into my mind :) . > > Maybe it's time we make this a fail? > > Cheers, > Quentin
Pavel Zhukov <pavel@zhukoff.net> writes: > Quentin Schulz <quentin.schulz@theobroma-systems.com> writes: > >> Hi Pavel, > Hi Quentin! >> >> On 1/18/23 08:28, Pavel Zhukov wrote: >>> While the parameter is not required it allows testing of possible >> >> I was convinced it was required for a year already but no :) >> >> I see Richard added a warning in Bitbake when the branch parameter is >> missing and nobranch is not set to 1, >> c.f. https://git.openembedded.org/bitbake/commit/?id=86a9c26828479be55865bcce72bcc7e12b93caa7 > Right, I saw this warning in the past but not this time... Anyway at the > scope of this patch branch parameter can be changed with any other > (rebaseable,bareclone etc) parameter git fetcher accpes. > branch one is just first that came into my mind > :) . Well. The warning is there but it's diplayed only if test failed: Stdout: URL: git://git.fake.repo/bitbake does not set any branch parameter. The future default branch used by tools and repositories is uncertain and we will therefore soon require this is set in all git urls. So yes, we don't fail test if it's missed. And even more, test will fail if it's specified and premirror is used in current bitbake >> >> Maybe it's time we make this a fail? >> >> Cheers, >> Quentin
Hi Pavel, On 1/18/23 11:13, Pavel Zhukov wrote: > > Pavel Zhukov <pavel@zhukoff.net> writes: > >> Quentin Schulz <quentin.schulz@theobroma-systems.com> writes: >> >>> Hi Pavel, >> Hi Quentin! >>> >>> On 1/18/23 08:28, Pavel Zhukov wrote: >>>> While the parameter is not required it allows testing of possible >>> >>> I was convinced it was required for a year already but no :) >>> >>> I see Richard added a warning in Bitbake when the branch parameter is >>> missing and nobranch is not set to 1, >>> c.f. https://urldefense.com/v3/__https://git.openembedded.org/bitbake/commit/?id=86a9c26828479be55865bcce72bcc7e12b93caa7__;!!OOPJP91ZZw!jDJyOLMmDaxwKpz9hULAvJ2SOX6mIeqJ0lI-Wx73AiRQkXmRq-Y26SLMuRJbgJ-haBjaDrky_IAHx26NmhnzxYWsE0S6qwA$ >> Right, I saw this warning in the past but not this time... Anyway at the >> scope of this patch branch parameter can be changed with any other >> (rebaseable,bareclone etc) parameter git fetcher accpes. >> branch one is just first that came into my mind >> :) . > Well. The warning is there but it's diplayed only if test failed: > Stdout: > URL: git://git.fake.repo/bitbake does not set any branch parameter. The future default branch used by tools and repositories is uncertain and we will therefore soon require this is set in all git urls. > > So yes, we don't fail test if it's missed. And even more, test will fail > if it's specified and premirror is used in current bitbake > Sorry I wasn't clear. It's not a comment on your patch. If something needs to be done, it's in bitbake fetcher to make this a fail, unrelated to your patch. I was just raising this so that someone can/should have a look at it (and add a test with the missing branch parameter). Cheers, Quentin
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index ad3d4dea..4a10b16f 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -2852,7 +2852,7 @@ class FetchPremirroronlyLocalTest(FetcherTest): os.mkdir(self.mirrordir) self.reponame = "bitbake" self.gitdir = os.path.join(self.tempdir, "git", self.reponame) - self.recipe_url = "git://git.fake.repo/bitbake" + self.recipe_url = "git://git.fake.repo/bitbake;branch=master" self.d.setVar("BB_FETCH_PREMIRRORONLY", "1") self.d.setVar("BB_NO_NETWORK", "1") self.d.setVar("PREMIRRORS", self.recipe_url + " " + "file://{}".format(self.mirrordir) + " \n")
While the parameter is not required it allows testing of possible regression in fetcher code when parameter specified and mirrors are used. Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> --- lib/bb/tests/fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)