feat(cli): modern command architecture, repo management, self-update and self-uninstall - #12
Merged
Merged
Conversation
…and self-uninstall - Move repository operations under 'pkg repo': repo list, repo remote, repo update, repo add, repo remove - Separate 'pkg upgrade' (package updates) from 'pkg update' (guidance notice) - Add native 'pkg self-update' with sha256 verification and atomic binary replacement - Add native 'pkg self-uninstall' with dry-run, purge, and shell PATH cleanup - Automatically integrate desktop files on install and deintegrate on remove - Fetch official Ubuntu archive keyring automatically in deb repository updater when absent on host
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 modernizes the
pkgCLI command structure according to user feedback and operational best practices:Repository Management Consolidation (
pkg repo):pkg syncwithpkg repo updatepkg repo remoteto query and list official repositories from curated registrypkg repo list(default forpkg repo) to display locally configured repositoriespkg repo add <id> [url]to support curated ID or custom URL with explicit distribution suitepkg repo remove <id>to safely remove configured repositoriesPackage Update vs Upgrade Separation:
pkg upgrade: Performs package upgrades with--dry-run,--yes, and single-package targetspkg update: Friendly guidance command explaining the separation betweenpkg upgradeandpkg repo updateNative Self-Management:
pkg self-update: In-place atomic update of thepkgbinary with sha256 checksum verification from release mirrorpkg self-uninstall: Native uninstallation with--purge,--dry-run, and shell rc PATH cleanupDesktop Integration Automation:
pkg installautomatically links desktop, mime, and icon resources (opt-out with--no-integrate)pkg remove(aliasuninstall) automatically unlinks desktop resourcesintegrate,deintegrate,migrate) hidden from top-level helpCross-Distro Ubuntu Keyring Fetching:
Verification
cargo test --workspace: All 94 unit tests and 27 integration test suites passingcargo clippy --workspace --all-targets -- -D warnings: 0 warnings, 0 errorscargo fmt --all --check: Clean