fix(anolisa): skip rpm probe on non-rpm hosts - #4
Closed
ikunkun-sys wants to merge 1 commit into
Closed
Conversation
A fresh raw system-scope install always probed the rpmdb (planner rule I3), so on deb-family hosts such as Ubuntu the missing rpm binary turned a vacuous check into a hard 'rpm not found on PATH' refusal. Gate the probe on the host package family from /etc/os-release: hosts whose authority is not RPM have no rpmdb to protect and plan with NotProbed, while rpm-family and unrecognized hosts keep failing closed. Assisted-by: Qoder:1.1.8 Signed-off-by: 爱鲲 <jiawa.syx@alibaba-inc.com>
Owner
Author
|
Superseded by upstream PR alibaba#2061. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
anolisa installrefused raw-backend installs on hosts without RPM tooling (e.g. Ubuntu), failing withrpm not found on PATHeven though the raw backend does not need rpm/dnf. The failure came from the planner's I3 system-RPM presence probe, which ran unconditionally for fresh raw system-scope installs. This PR gates the probe on the host package family derived from/etc/os-release: deb-family hosts have no rpmdb to protect, so the probe is skipped and the planner seesNotProbed; rpm-family and unrecognized hosts keep the probe and still fail closed when tooling is missing.Related Issue
no-issue: user-reported runtime bug fixed directly
Type of Change
Scope
anolisa(anolisa-cli)Testing
cargo fmt --all -- --check,cargo clippy -p anolisa-cli --all-targets -- -D warnings,cargo doc -p anolisa-cli --no-depsall passcargo test -p anolisa-cli: 756+ tests pass on an rpm-family host (alinux)system_rpm_probe_follows_host_package_familycovers rpm/deb/unknown/undetected classificationsdeb_host_missing_rpm_tooling_does_not_block_raw_installverified by re-running the test binary underunsharewith a bind-mounted Ubuntu/etc/os-release: the raw install completes withCommandMissingrpm queries, and the strict-refusal test correctly steps asideChecklist
[Unreleased])