feat(zypper): add repository discovery, add, and remove support - #238
Open
Xarianne wants to merge 1 commit into
Open
feat(zypper): add repository discovery, add, and remove support#238Xarianne wants to merge 1 commit into
Xarianne wants to merge 1 commit into
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.
Add Zypper repository support
Summary
Implements full repository lifecycle support for the Zypper backend. Previously
metapaconly listed Zypper packages; it could not discover, add, or remove Zypper repositories. This change makes Zypper behave consistently with other backend repository implementations while respecting Zypper-specific conventions such as$releasever/$basearchvariables and GPG key handling.Changes
src/backends/zypper.rszypper repos --show-enabled-only --export -, which returns INI-style.repodefinitions.openSUSE:*repositories are filtered out of unmanaged output.ZypperRepoOptionsgained an optionalgpgkeyfield so exported signing-key configuration is preserved.add_reposnow supports two forms:.repofile URLs (e.g. Brave's officialbrave-browser.repo).baseurlrepositories with an explicitgpgkey, which are recreated via a temporary.repodefinition.remove_reposremoves repositories by alias usingzypper removerepo.il(locked but explicitly installed) status in addition toi+, preventing locked packages such askernel-defaultfrom appearing as missing.README.md$releaseverparagraph.Tests
gpgkeyextraction.Example group file
Notes for reviewers
openSUSE:because these are distribution repositories managed by theopenSUSEservice. This is conceptually similar to DNF only listing COPR repos withdnf copr list; Zypper has no equivalent "third-party only" command, so a prefix filter is used to avoid cluttering unmanaged output with default repos.--non-interactiveis only passed whenno_confirmis set, matching existing backend conventions. Interactivemetapac synctherefore lets Zypper prompt for new GPG keys.gpgkey, metapac writes a temporary.repofile and passes that tozypper addrepo, because theaddrepocommand accepts either a plain URL plus alias or a full.repofile, not individual settings likegpgkey.