Alexpux / MSYS2-pacman

MSYS2 port of Arch Linux packman package manager.
GNU General Public License v2.0
164 stars 34 forks source link

clarify the `update-core` restart process #17

Closed PhilipOakley closed 8 years ago

PhilipOakley commented 8 years ago

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 https://github.com/git-for-windows/git/issues/415#issuecomment-142016314 for the back story)).

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

Alexpux commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

You can create pull request directly in this repo.

PhilipOakley commented 8 years ago

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