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

make the initialization and upgrade process more reliable and upgrade to 20161025 #10

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

Conversation

rgl
Copy link

@rgl rgl commented Dec 10, 2016

I was having trouble installing msys2:

==> default: Chocolatey v0.10.3                                                                                                                
==> default: Installing the following packages:                                                                                                
==> default: msys2                                                                                                                             
==> default: By installing you accept licenses for the packages.                                                                               
==> default: msys2 v20160719.1.1 [Approved]                                                                                                    
==> default: msys2 package files install completed. Performing other installation steps.                                                       
==> default: Adding 'C:\ProgramData\chocolatey\lib\msys2' to PATH...                                                                           
==> default: PATH environment variable does not have C:\ProgramData\chocolatey\lib\msys2 in it. Adding...                                      
==> default: Installing to 'C:\tools\msys64'                                                                                                   
==> default: Downloading msys2 64 bit                                                                                                          
==> default:   from 'http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20160719.tar.xz'                                                   
==> default: Download of msys2-base-x86_64-20160719.tar.xz (44.82 MB) completed.                                                               
==> default: Hashes match.                                                                                                                     
==> default: Extracting C:\Users\vagrant\AppData\Local\Temp\msys2\20160719.1.1\msys2-base-x86_64-20160719.tar.xz to C:\tools...                
==> default: C:\tools                                                                                                                          
==> default:                                                                                                                                   
==> default: Extracting C:\tools\msys2-base-x86_64-20160719.tar to C:\tools...                                                                 
==> default: C:\tools                                                                                                                          
==> default:                                                                                                                                   
==> default: Adding 'C:\tools\msys64' to PATH...                                                                                               
==> default: PATH environment variable does not have C:\tools\msys64 in it. Adding...                                                          
==> default: Initializing MSYS2...                                                                                                             
==> default:                                                                                                                                   
==> default: Starting 'C:\tools\msys64\msys2.exe'...                                                                                           
==> default: Upgrading core system packages with 'pacman --noconfirm -Syuu'...                                                                 
==> default: Upgrading full system with 'pacman --noconfirm -Syuu'...                                                                          
==> default: Environment Vars (like PATH) have changed. Close/reopen your shell to                                                             
==> default:                                                                                                                                   
==> default:  see the changes (or in powershell/cmd.exe just type `refreshenv`).                                                               
==> default:  The install of msys2 was successful.                                                                                             
==> default:                                                                                                                                   
==> default:   Software installed to 'C:\tools'                                                                                                
==> default:                                                                                                                                   
==> default: Chocolatey installed 1/1 packages. 0 packages failed.                                                                             
==> default:  See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).                                                         
==> default: :: Synchronizing package databases...                                                                                             
==> default:                                                                                                                                   
==> default: error: failed to update mingw32 (unable to lock database)                                                                         
==> default: error: failed to update mingw64 (unable to lock database)                                                                         
==> default: error: failed to update msys (unable to lock database)                                                                            
==> default: error: failed to synchronize any databases                                                                                        
==> default: error: failed to init transaction (unable to lock database)                                                                       
==> default: error: could not lock database: File exists                                                                                       
==> default:   if you're sure a package manager is not already                                                                                 
==> default:   running, you can remove /var/lib/pacman/db.lck                                                                                  
==> default: ERROR: bash execution failed with exit code 1                                                                                     
==> default: ERROR: at Bash, C:\vagrant\provision.ps1: line 300                                                                                
==> default: ERROR: at <ScriptBlock>, C:\vagrant\provision.ps1: line 308                                                                       
==> default: ERROR: at <ScriptBlock>, C:\tmp\vagrant-shell.ps1: line 41                                                                        
The following WinRM command responded with a non-zero exit status.                                                                             
Vagrant assumes that this means the command failed!                                                                                            
                                                                                                                                               
powershell -ExecutionPolicy Bypass -OutputFormat Text -file c:\tmp\vagrant-shell.ps1 provision.ps1                                             
                                                                                                                                               
Stdout from the command:                                                                                                                       
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               
Stderr from the command:                                                                                                                       
                                                                                                                                               

It turns out that the initialization (the first call to bash) was still running before the pacman system upgrade process was started, as you can see in this picture:

image

Also, there was not much visibility into the msys2 upgrade process, so this pull request also outputs the msys2 initialization and pacman upgrade messages to the therminal.

The upgrade process was also augmented to keep the upgrade going until no more packages are available to upgrade.

This also upgrades msys2 to 20161025.

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.

1 participant