Closed jepessen closed 3 years ago
I had a similar problem after updating from the repository. After the update I forgot to re-run bootstrap-vcpkg but I was advised of this only after running 'vcpkg upgrade --no-dry-run'. After the initial phase when old packages are purged (and lost) I finally get the error telling me that vcpkg needs to be rebuild. This simple check should be done as first thing when vcpkg update/upgrade is invoked. And in any case vcpkg should keep track somehow of the packages that needs to be updated. Possible scenarios could be an error during the download phase, an error during the build phase, an unexpected shutdown of the system, splitting the build process in multiple build sessions...
I've learned to do the following after each refresh of vcpkg:
I put the entire vcpkg install blah
line in a vcpkg-install.txt
file so all requirements can be easily installed from scratch.
That way you don't have to bother with manually keeping track of what goes wrong etc.
Spotty internet is a very common fault and should be handled gracefully.
The list of packages currently upgrading should be automatically handled by vcpkg
and not deferred to the end user.
Duplicated to https://github.com/microsoft/vcpkg/issues/4360.
When I update vcpkg from the repository, I often perform a
vcpkg update --no-dry-run operation
in order to upgrade libraries to latest version. When I upgrade libraries with a lot of dependencies, like qt5 or boost, sometimes it happens that I lost the internet connection, so the upgrade fails.It stops, but if I repeat the command many libraries are not installed anymore.
For example: with the command I upgrade the zmq library; at first step vcpkg deletes all libraries, and then it rebuild again libraries from scratch. If at some point the upgrade is interrupted, for example due to internet connection, before upgrading zmq, If I run the upgrade again zmq is not installed anymore. The result is that after restarting the upgrade the library was uninstalled but not installed, and I need to install it again manually.
It would be nice if vcpkg stores somewhere the list of ports that needs to be upgraded with a vcpkg upgrade, and then remove packages from this list one by one when installed, so even if upgrade is interrupted it can be recovered in a nice way without lose any package.
Environment
To Reproduce
git pull origin master
for updating the repository./bootstrap-vcpkg.bat
./vcpkg upgrade --no-dry-run
./vpkg upgrade --no-dry-run
Expected behavior When the upgrade is interrupted and repeated. I expect that vcpkg upgrades all packages without missing anyone.