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

clarify the update-core restart process #17

Closed
PhilipOakley opened this issue Sep 22, 2015 · 4 comments
Closed

clarify the update-core restart process #17

PhilipOakley opened this issue Sep 22, 2015 · 4 comments

Comments

@PhilipOakley
Copy link
Contributor

In https://github.com/Alexpux/MSYS2-pacman/blob/master/scripts/update-core.sh.in#L92 there is a dire warning about restarting MSYS2, but without any clarification of the appropriate 'how to' for the less gifted individual (e.g. me).

In the Git for Windows SDK release notes https://github.com/git-for-windows/build-extra/releases/tag/net-installer-1.0.0-rc-1 @dscho (in the caveats section) notes that "it is highly recommended to close all other MSys2 programs (e.g. terminal windows, Bash sessions, etc) and update msys2-runtime
individually, immediately close the window (i.e. not run exit) and then restart the update in a new window."

It wasn't clear to me if the update-core script would pause to allow the user to close any relevant windows (How would they know which one's to close?), nor that they should use the windows red 'X' close icon (Alt-F4) rather than entering exit upon completion of updates (see also git-for-windows/git#415 (comment) for the back story)).

Or does the update-core already cope with all this?

@Alexpux
Copy link
Owner

Alexpux commented Sep 23, 2015

Script update-core only try update packages. It not kill MSYS2 processes. You MUST close all MSYS2 processes yourself before updating. In other case if msys2-runtime package will be updated you can't properly work with currently running MSYS2 applications.
After msys2-runtime package upgrade you can't run any commands in shell too, so typing exit in most cases leads to errors.

@PhilipOakley
Copy link
Contributor Author

Script update-core only try update packages. It not kill MSYS2 processes.

OK

You MUST close all MSYS2 processes yourself before updating. [my emphasis]

But the script gives me no time between the warning, and starting the update. I cannot know to do the closing before running the update because it does the check...

In other case if msys2-runtime package will be updated you can't properly work with currently running MSYS2 applications.

This confirms your, and @dscho's, warnings.

After msys2-runtime package upgrade you can't run any commands in shell too, so typing exit in most cases leads to errors.

IIUC, the right way is to close the remaining MSYS2 window (that is running the core-update) by using the Alt-F4 or the red 'x' close icon [I'm repeating this just for confirmation].

Maybe something (just after the warning) along the lines of :

read -p "Press [Enter] key when ready to start update..."

Is this worth me doing a PR?. (Or do you prefer a separate script that would just do the check-if-core-update-required.)

Philip

@Alexpux
Copy link
Owner

Alexpux commented Sep 23, 2015

You can create pull request directly in this repo.

PhilipOakley pushed a commit to PhilipOakley/MSYS2-pacman that referenced this issue Sep 27, 2015
Give the user the opportunity to complete their work in other MSYS2
windows by prompting for their closure if the core requires update.

Also prompt the user to close, rather than exit, the update-core window
after upfate has completed to avoid a stream of error reports to the user,
and the project.

Responds to Alexpux#17

Signed-off-by: Philip Oakley <philipoakley@iee.org>
PhilipOakley pushed a commit to PhilipOakley/MSYS2-pacman that referenced this issue Sep 27, 2015
Give the user the opportunity to complete their work in other MSYS2
windows by prompting for their closure if the core requires update.

Also prompt the user to close, rather than exit, the update-core window
after update has completed to avoid a stream of error reports to the user,
and the project.

Responds to Alexpux#17

Signed-off-by: Philip Oakley <philipoakley@iee.org>
@PhilipOakley
Copy link
Contributor Author

The main feature of the issue have now been merged, and I failed to notice I needed to close the issue.

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

No branches or pull requests

2 participants