Bug 15875

Summary: Improve message error around mirroring selftest
Product: [QA/Testing] Functional (self) Testing Reporter: Yoann Congal <yoann.congal>
Component: oe-selftestAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod
Version: unspecified   
Target Milestone: 6.2 M2   
Hardware: x86   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15867
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yoann Congal 2025-05-22 15:11:33 UTC
(from #15867)

When a source package is not available on the mirror, the test_yocto_source_mirror selftest output message such as this:
  The URL: 'https://archive.mesa3d.org/mesa-25.1.0.tar.xz' is not trusted and cannot be used

But the troubling URL is really on the mirroring side:
  https://downloads.yoctoproject.org/mirror/sources/mesa-25.1.0.tar.xz

This message needs to be improved to mention the fact that in this case, bitbake was configured to only use mirrors (no external internet access).

See test definition: meta/lib/oeqa/selftest/cases/buildoptions.py:
@OETestTag("yocto-mirrors")
class SourceMirroring(OESelftestTestCase):
    # Can we download everything from the Yocto Sources Mirror over http only
    def test_yocto_source_mirror(self):
        self.write_config("""
BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org"
MIRRORS = ""
DL_DIR = "${TMPDIR}/test_downloads"
STAMPS_DIR = "${TMPDIR}/test_stamps"
SSTATE_DIR = "${TMPDIR}/test_sstate-cache"
PREMIRRORS = "\\
    bzr://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    cvs://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    git://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    hg://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    osc://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    p4://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    svn://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    ftp://.*/.*      http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    http://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \\n \\
    https://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \\n"
""")

        bitbake("world --runall fetch --continue")
Comment 1 Randy MacLeod 2025-05-29 14:34:30 UTC
Will likely need changes in the bitbake fetcher code.