-
Notifications
You must be signed in to change notification settings - Fork 281
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
pkg: Implement message type "before" to display a pre-(install|upgrade) message. #1910
base: main
Are you sure you want to change the base?
Conversation
I do like what I see, thanks a lot, would it be possible to add tests in the test suite ? |
- Update test suite to include also "before" - Update the keywords to include "before"-type message - Fix manual page pkg-keywords.5
I like the idea of a "before" notion for packages, it should be tight to the same notions as install, upgrade etc. We should be able to show a before/pre upgrade message only if upgrading from a given version to a given version, or only when about to remove a package etc. I think we should work toward that. As for the way it is coded right now, I do like the patch I am seeing ;) |
I will merge my changes for pre-install, pre-upgrade, pre-remove. |
Hello sorry it took time to get back to you. I really like this, how ever printing a message before the upgrade or install is happening is actually only useful if it is being done before the user actually proceed to the transaction. the proposed implementation will print something and proceed anyway which is not really useful for the end user. Just before the "Proceed with this action? [y/N]: " there should be a loop on the job looking at all package to be installed, upgrade or removed, extracting the message from them and printing it. |
Agree with this proposed design, rather than a timer and proceed anyway. I think the porters handbook documentation should advise port maintainers to only use pre-upgrade messages if they really want to prompt users before proceeding - and steer them to use upgrade (renamed to post-upgrade?) otherwise? |
Implement a pkg-message type
before
that will be displayed before install and/or upgrade of package. For now, alsosleep(10)
is performed (although the time could be parametrized, with0
being no sleep() at all).