Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split packages support for GETPKGBUILD #1230

Closed
wants to merge 1 commit into from

Conversation

arenevier
Copy link
Contributor

Split packages are not supported in. For example, running paru -Gp gvim will display the html content of this 404 page

This 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.

@arenevier
Copy link
Contributor Author

test all pass locally for me. (by running cargo test --features mock)

@Morganamilo
Copy link
Owner

Sorry I'm so behind on PRs and issues. I fixed this a while ago with c894e25

I think it's the better approach as split_repo_aur_pkgbuilds still returns Targs so the caller can choose which part they care about.

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.

2 participants