fetch2: Make checkstatus respect try_premirror
PATCH 1/1 fetch2: Make checkstatus respect try_premirror
Otherwise we might be hitting premirrors for repos that exist only locally.
--- lib/bb/fetch2/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
lib/bb/fetch2/__init__.py +6 -2
@@ -1975,9 +1975,13 @@ class Fetch(object): ud.setup_localpath(self.d) m = ud.method logger.debug("Testing URL %s", u) + + ret = False # First try checking uri, u, from PREMIRRORS - mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) - ret = m.try_mirrors(self, ud, self.d, mirrors, True) + if m.try_premirror(ud, self.d): + mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) + ret = m.try_mirrors(self, ud, self.d, mirrors, True) + if not ret: # Next try checking from the original uri, u ret = m.checkstatus(self, ud, self.d)
Signature · 1 line
2.50.0
If someone isn't already very familiar with what try_premirror() does, they wouldn't understand the issue or the fix. A better commit message should include that information.
It would as well help if you explain in detail how to observe the issue. Do we need to add a test for it?
Alex
Quoted 41 lines · Michal Sieron via lists.openembedded.org
Otherwise we might be hitting premirrors for repos that exist only locally.
Signed-off-by Michal Sieron <[email protected]>--- lib/bb/fetch2/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)lib/bb/fetch2/__init__.py +6
-3@@ -1975,9 +1975,13 @@ class Fetch(object): ud.setup_localpath(self.d) m = ud.method logger.debug("Testing URL %s", u) + + ret = False # First try checking uri, u, from PREMIRRORS - mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) - ret = m.try_mirrors(self, ud, self.d, mirrors, True) + if m.try_premirror(ud, self.d): + mirrors = mirror_from_string(self.d.getVar('PREMIRRORS')) + ret = m.try_mirrors(self, ud, self.d, mirrors, True) + if not ret: # Next try checking from the original uri, u ret = m.checkstatus(self, ud, self.d) --2.50.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17732): https://lists.openembedded.org/g/bitbake-devel/message/17732
Mute This Topic: https://lists.openembedded.org/mt/113925872/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-