summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2025-10-11 01:11:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-10-13 18:01:04 +0100
commita41bfa10a0336526f6af7dc19478b949baa83479 (patch)
tree4930849fcfd68579854e2fdb08084b4855fa5828 /meta/lib
parentc4c27366f52e9c08dc48bde1521dcaff9d4f2f14 (diff)
downloadpoky-a41bfa10a0336526f6af7dc19478b949baa83479.tar.gz
oeqa/selftest/buildoptions: Fix test_yocto_source_mirror MIRRORS & PREMIRRORS definitions
Currently, the definitions of MIRRORS and PREMIRRORS made by test_yocto_source_mirror() are overwritten when run on the autobuilder: * MIRRORS = "" is extended by mirrors.bbclass to its usual value. * PREMIRRORS = "* dl.yp.org" is overwritten by the autobuilder.conf config fragment to "" Simplified variable history: # $MIRRORS [4 operations] # set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:3 # "" # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:57 # "${DEBIAN_MIRROR} ..." MIRRORS=" http://deb.debian.org/debian/pool ..." # $PREMIRRORS [4 operations] # set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:18 # " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ..." # set .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/conf/fragments/yocto-autobuilder/autobuilder.conf:6 # "" # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:84 # "git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ ..." PREMIRRORS=" git://sourceware.org/git/glibc.git https://downloads.yoctoproject.org/mirror/sources/ ..." Despite this unexpected configuration, the test passes because after failing to find a PREMIRROR (empty), failing to download the normal SRC_URI (because of BB_ALLOWED_NETWORKS), the fetcher tries the MIRRORS which have by default download.yoctoproject.org. For example, on a failed meta-oe-mirror test[0], we can see a lot of warnings: "stdio: WARNING: ... do_fetch: Failed to fetch URL https://... attempting MIRRORS if available" By using the ":forcevariable" override, test_yocto_source_mirror() makes sure the correct value is set for MIRRORS and PREMIRRORS (whatever is the configuration). Simplified variable history (after the fix): # $MIRRORS [4 operations] # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:57 # "${DEBIAN_MIRROR} ..." # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:68 # "git://salsa.debian.org/.* ..." # override[forcevariable]:set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:3 # "" MIRRORS="" # $PREMIRRORS [4 operations] # set .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/conf/fragments/yocto-autobuilder/autobuilder.conf:6 # "" # append .../contribution-yocto/builds/build-qemux86-64-st/../../layers/poky/meta/classes-global/mirrors.bbclass:84 # "git://sourceware.org/git/glibc.git ..." # override[forcevariable]:set .../contribution-yocto/builds/build-qemux86-64-st/conf/selftest.inc:18 # " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..." # pre-expansion value: # " bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..." PREMIRRORS=" bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ ..." [0]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/82/builds/470/steps/17/logs/warnings Fixes [YOCTO #15993] (From OE-Core rev: ab810d1239d4db0bc0f23db31c70cc9c6e59357e) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/buildoptions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py
index 767e19bd88..b46f55e256 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -173,11 +173,11 @@ class SourceMirroring(OESelftestTestCase):
173 def test_yocto_source_mirror(self): 173 def test_yocto_source_mirror(self):
174 self.write_config(""" 174 self.write_config("""
175BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org" 175BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org"
176MIRRORS = "" 176MIRRORS:forcevariable = ""
177DL_DIR = "${TMPDIR}/test_downloads" 177DL_DIR = "${TMPDIR}/test_downloads"
178STAMPS_DIR = "${TMPDIR}/test_stamps" 178STAMPS_DIR = "${TMPDIR}/test_stamps"
179SSTATE_DIR = "${TMPDIR}/test_sstate-cache" 179SSTATE_DIR = "${TMPDIR}/test_sstate-cache"
180PREMIRRORS = "\\ 180PREMIRRORS:forcevariable = "\\
181 bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\ 181 bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
182 cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\ 182 cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
183 git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\ 183 git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\