split packages support for GETPKGBUILD #1230
Closed
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.
Split packages are not supported in. For example, running
paru -Gp gvim
will display the html content of this 404 pageThis patch adds support for split packages. In
split_repo_aur_pkgbuilds
, the base package of the target is checked. If different from the target, the base name will be used instead.Test: run
paru -Gp gvim
. It will now display vim PKGBUILD.No need to do anything for aur. split packages are already supported.
Implementation note:
Since the base() string lifetime is less than the lifetime of targets, the only way I could find to make it work is to use String instead of &str. I tried to add lifetime annotation for the config parameter, but it was not working out (since it's borrowed in some other place). I am novice in rust. So maybe there is a better way.
I also modified split_repo_aur_pkgbuilds to return strings instead of the Targ struct. Indeed, the repo field is never used.