-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
feat(install): add --keepsrc to keep pkg/ and src/ directories #2272
Conversation
AUR packages Providing this flag during installation of AUR packages allows for keeping the src/ and pkg/ directories produced my makepkg. If the user wants to delete the directories, they can either select to cleanBuild in the cleanmenu or run the installation without the --nocleanbuild flag (yay will only remove the directories if the package is rebuilt)
This makes the description consistent with the descriptions in the man page, --help, and zsh completion.
This is absolutely critical for building large packages like kernels, where a failed build step (for whatever reason) can really take a lot of time to get back to. |
Hey @jdholtz , I think we can merge this, let try and fix the CI. I think |
Sounds good. Do you want me to go with |
I think |
Would be good. Though =yes and =no I think is nicer. |
This naming scheme is more familiar to users since it is the name of the flag in Paru.
Yes, that would be nice. Many of the options prefixed with
There could be multiple booleans used, like "yes", "true", and "y" for true and "no", "false", and "n" for false. |
merging :) @jdholtz would you be interested in implementing this boolean flag system? We'd just need to keep old toggles working for a while |
sorry @jdholtz , ended forgetting to remove the coauthored line from the merge message, if it's important for you I'll revert and recommit with the proper author information |
Yes, I can.
No worries, you can keep it as is. |
Should fix #798.
Providing this flag during installation of AUR packages allows for keeping the src/ and pkg/ directories produced my makepkg. If the user wants to delete the directories, they can either select to cleanBuild in the cleanmenu or run the installation without the
--nocleanbuild
flag.The one inconsistency I found when running Yay without the
--nocleanbuild
flag (and if pkg/ and src/ directories previously existed), since Yay runspacman -U
separately from makepkg, Yay will not clean the directories if the package is cached already whereas makepkg will. I don't think this is a big deal since Yay provides the cleanmenu, but we could discuss solutions to fix this inconsistency if you want.I added tests in both places that make this check.
I opted not to add a
--cleanbuild
option that would override the option in the config file as I thought it would be confusing due to it being a makepkg flag. However, I can add it if desired. Also, I can change the name of the flag (paru uses--keepsrc
but we could think of a different name to use as well).Last, I exposed the
CleanBuild
attribute in thecmdBuilder
as that is where I thought it was the easiest to access it. I'm not super familiar with Go so please let me know if it could be refactored to be put in a more logical place.