Fix Texinfo source fallback#4577
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Texinfo tool installation flow to avoid hard-failing on distros/images where texinfo (or source-build dependency packages) are not available from the configured package repositories, and instead falls back to building Texinfo from source.
Changes:
- Check
texinforepo availability viaPosix.is_package_in_repo()before attemptinginstall_packages("texinfo"), and fall back to a source build when it’s not available. - When falling back to source, only install dependency packages that are actually available in the current distro repo (avoids failures on RPM-only names like
perl-Data-Dumperon Ubuntu). - Refactor fallback logic into
_install_from_src_with_dependencies()for reuse from both the “not in repo” path and the exception path.
Notes (PR hygiene):
- The PR description template still has empty “Related Issue” and “Test Validation / Test Results” sections; consider linking an issue for traceability and posting the validation you ran before merge.
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
|
Please provide the test matrix which you are trying to fix and provide the test results against your latest change. |
Check distro package availability before installing texinfo so images without a candidate package use the source-build fallback instead of failing during apt install. Install only available fallback dependency packages before building from source, which keeps Ubuntu images from failing on RPM-only package names such as perl-Data-Dumper.
16f3405 to
7f5a8aa
Compare
@LiliDeng The failure this PR is trying to fix is Texinfo installation on images where the distro package is not available from the configured package repository. Previously, the Texinfo tool tried the distro package install first and could fail during The fix checks package availability before installing Texinfo, so images without an available distro package use the source-build fallback. It also installs only the fallback dependency packages that are available on the current distro. I validated the change withlsg-lisa pipeline completed successfully. Test matrix and results: (These filed earlier)
Overall selected LISA result: 28 passed, 0 failed, 0 skipped. Covered tests include: |
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Check distro package availability before installing texinfo so images without a candidate package use the source-build fallback instead of failing during apt install.
Install only available fallback dependency packages before building from source, which keeps Ubuntu images from failing on RPM-only package names such as perl-Data-Dumper.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results