Vcpkg: Why are packages uninstalled before successful upgrade?

Created on 13 Mar 2018  路  8Comments  路  Source: microsoft/vcpkg

One of the biggest issue I find as a vcpkg user is when you issue an upgrade command where each package is first uninstalled and then re-compiled/installed.

This is a big problem when the process fails at any of its step (compilation, post-build, etc), see for example #2852. When an upgrade fails you are left in an incomplete state where you have some of the library uninstalled (thus no longer appear as upgradable) and you are basically left to yourself with two solutions:

  1. try to fix the issue and possibly open a PR
  2. rollback to a previous commit and wait for the problem to be fixed (this part, if I'm not wrong, may be quite obsucre to new users).

As per the issue title: why are packages uninstalled before successful upgrade?

I reckon this would also be a nice step toward versioning the installations as suggested #2823.

cc @pattacini

vcpkg-bug

All 8 comments

Ping on this issue.

Yep. cmake was updated and the new binary was blocked by my firewall. By the time I allowed it, it had failed and vcpkg quit. Running vcpkg again outputs "All installed packages are up-to-date with the local portfiles." So now I'll have to copy paste the previous output from my console, try to format it and run an install again. That's mildly annoying to say the least. Not how I wanted to spend my morning.

That's mildly annoying to say the least. Not how I wanted to spend my morning.

That's the point. Every time I issue an update or something that touches packages and/or installation, I feel that I will waste some of my time because something will just go wrong. There should be a layer in between updates/installation that ensures the integrity of vcpkg folder (at least to a certain extent).

I guess the best vcpkg could do is to move all packages that are about to be updated into some sort of backup folder and restore them on failure.

As long as they fix this, everything it's fine.

Is there any new information on this issue? It's quite frustrating when I upgrade a few dozen packages and the process fails when there's still quite a few packages to be rebuilt.

3176 was closed in favor of this to track the issue. Probably something is on the move.

For the time being, every time I upgrade I do the following dumb thing: I save my vcpkg list in a txt file, reformat it as a vcpkg install command and spam it until everything is installed (fixing any issue I find along the way).

This truly is a regular annoyance to me. You upgrade a list of libraries, something goes wrong along the way (internet connection drops, you are sending the PC to standby in the wrong moment, compilation error ...) and you are left with a half empty system.

I once tried to use a single vcpkg instance for both windows and wsl. Running the upgrade on windows deleted all my (outdated) linux packages, but of course wasn't able to reinstall them. I'm not sure, but I believe that even cancelled the remaining windows jobs :(

Was this page helpful?
0 / 5 - 0 ratings