feat(resolver): broad host evidence discovery, virtual package (Provides) resolution & --no-deps flag - #7
Merged
Conversation
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.
Summary
This PR establishes broad host evidence discovery and virtual package resolution to solve cross-distribution dependency resolution failures (such as installing foreign
.debpackages on Arch Linux or.rpmpackages on Debian/Ubuntu), and adds the--no-depsflag for standalone installations.Key Changes
crates/pkg-core/src/resolver/evidence.rs):/binand/usr/bin(~1.3ms runtime) replacing hardcoded lists with dynamic system executable capabilities (bin:<cmd>).feature:default-dbus-session-bus,feature:dbus-session-bus), GSettings/DConf (feature:gsettings-backend,feature:dconf-gsettings-backend), Wayland, X11, PipeWire, PulseAudio, ALSA, CA certificates, and desktop integration resources./var/lib/pacman/local/*/desc) and Debian/Ubuntu (/var/lib/dpkg/status) without root for installed packages and their declared%PROVIDES%/Provides:fields.crates/pkg-core/src/resolver/mod.rs):Constraint::Package) can now be satisfied by virtual package providers (both in repositories viapkg.provides/pkg.versioned_providesand from host evidence) while strictly upholding INV-007 cross-distro nominal safety boundaries.--no-deps/--skip-depsFlag (crates/pkg-cli,pkg-core):--no-deps(alias--skip-deps) topkg installand the MCPpkg.installtool, allowing users to install standalone packages without cascading dependency resolution.Verification
pkg-corepassed.pkg-clipassed, including new tests:test_virtual_package_resolved_via_repository_providestest_virtual_package_satisfied_via_host_feature_evidencetest_install_options_skip_dependenciestest_cli_install_with_no_deps_flagtest_cli_install_with_skip_deps_aliascargo test --workspacepassed with 0 failures.