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

pkg: Implement message type "before" to display a pre-(install|upgrade) message. #1910

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jurajlutter
Copy link
Member

Implement a pkg-message type before that will be displayed before install and/or upgrade of package. For now, also sleep(10) is performed (although the time could be parametrized, with 0 being no sleep() at all).

@bapt
Copy link
Member

bapt commented Nov 26, 2020

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
@bapt
Copy link
Member

bapt commented Dec 2, 2020

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 ;)

@jurajlutter
Copy link
Member Author

I will merge my changes for pre-install, pre-upgrade, pre-remove.

@bapt
Copy link
Member

bapt commented Mar 25, 2021

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.
I think the proper semantic would be for the to print it at the time the user will be asked to proceed, for example:

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.

@woodsb02
Copy link

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. I think the proper semantic would be for the to print it at the time the user will be asked to proceed, for example:

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?

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.

None yet

3 participants