Skip to content

fix(anolisa): skip rpm probe on non-rpm hosts - #4

Closed
ikunkun-sys wants to merge 1 commit into
mainfrom
fix/install/deb-host-raw-install
Closed

fix(anolisa): skip rpm probe on non-rpm hosts#4
ikunkun-sys wants to merge 1 commit into
mainfrom
fix/install/deb-host-raw-install

Conversation

@ikunkun-sys

Copy link
Copy Markdown
Owner

Description

anolisa install refused raw-backend installs on hosts without RPM tooling (e.g. Ubuntu), failing with rpm not found on PATH even 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 sees NotProbed; 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

  • Bug fix (non-breaking change that fixes an issue)

Scope

  • anolisa (anolisa-cli)

Testing

  • cargo fmt --all -- --check, cargo clippy -p anolisa-cli --all-targets -- -D warnings, cargo doc -p anolisa-cli --no-deps all pass
  • cargo test -p anolisa-cli: 756+ tests pass on an rpm-family host (alinux)
  • New unit test system_rpm_probe_follows_host_package_family covers rpm/deb/unknown/undetected classifications
  • New guarded integration test deb_host_missing_rpm_tooling_does_not_block_raw_install verified by re-running the test binary under unshare with a bind-mounted Ubuntu /etc/os-release: the raw install completes with CommandMissing rpm queries, and the strict-refusal test correctly steps aside

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly (CHANGELOG [Unreleased])

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>
@ikunkun-sys

Copy link
Copy Markdown
Owner Author

Superseded by upstream PR alibaba#2061.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant