Bug 15875 - Improve message error around mirroring selftest
Summary: Improve message error around mirroring selftest
Status: NEW
Alias: None
Product: Functional (self) Testing
Classification: QA/Testing
Component: oe-selftest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 6.2 M2
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-05-22 15:11 UTC by Yoann Congal
Modified: 2026-10-29 17:51 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.