Vcpkg: Download failure during upgrade is catastrophic

Created on 5 May 2019  Â·  6Comments  Â·  Source: microsoft/vcpkg

It is impossible to restart and recover - but all the installed packages that needed upgrade have already been uninstalled.

I'm not looking to squash and ignore the failure and continue on error - just to b able to restart the build and install process.

I'd also like to be able to do 'rebuild and install everything'.

vcpkg-feature

Most helpful comment

Thinking about this (without looking at the internals), I was thinking that:

  • it would be better to complete ALL the downloads, before staring to uninstall
  • in fact, it would better to download AND patch AND build - and then uninstall and install

I guess I'd like something that appears transactional, and I could do that on ZFS but perhaps not so easily on my Linux laptop or Windows desktop.

At the least, when we do 'upgrade' could we:

  • write out a list of 'thing to do 'vcpkg install' for
  • delete them and rewrite when each install completes
  • have a restart that processes the file

I think that would fix my issue.

BTW I've had the issue in two different circumstances:

  • on my laptop on my morning commute: went into a tunnel
  • on my desktop (and laptop) at home, trying to do 'vcpkg install boost' which would run for a while and then fail connecting for download of one of the components: I don't think my ADSL is that bad, though I am rural.

What's galling is that if I 'vcpkg install boost' and one of the parts fails, I can just redo and it picks up OK.

But, if that happens during 'vcpkg upgrade', then I'm totally hosed.

All 6 comments

Thinking about this (without looking at the internals), I was thinking that:

  • it would be better to complete ALL the downloads, before staring to uninstall
  • in fact, it would better to download AND patch AND build - and then uninstall and install

I guess I'd like something that appears transactional, and I could do that on ZFS but perhaps not so easily on my Linux laptop or Windows desktop.

At the least, when we do 'upgrade' could we:

  • write out a list of 'thing to do 'vcpkg install' for
  • delete them and rewrite when each install completes
  • have a restart that processes the file

I think that would fix my issue.

BTW I've had the issue in two different circumstances:

  • on my laptop on my morning commute: went into a tunnel
  • on my desktop (and laptop) at home, trying to do 'vcpkg install boost' which would run for a while and then fail connecting for download of one of the components: I don't think my ADSL is that bad, though I am rural.

What's galling is that if I 'vcpkg install boost' and one of the parts fails, I can just redo and it picks up OK.

But, if that happens during 'vcpkg upgrade', then I'm totally hosed.

Totally understand your pain. I have the habit of saving the list proposed by vcpkg upgrade before launching vcpkg upgrade --no-dry-run, as to be able to restart “resubmitting it as a whole” in case of problems. I have a wonderful 1Gbit fiber connection, but I have the same problem as you. It could also be the server that does not respond, once in a while, exactly while you’re doing your important upgrade... I’d not blame your rural adsl so much. For sure it’s a point where vcpkg can improve and your ideas are very nice!

I have a cmd line script to do the "vcpkg upgrade" command without the --no-dry-run option and have the output piped to a text file, then issue the "vcpkg upgrade --no-dry-run --keep-going" to do the actual upgrade. At least I then have a list of what was to be upgraded and the upgrade will keep going and install/recompile everything except those that fail due to cascade constraints or dependent other modules compiling. It's not perfect, but it works for me.

@timautry exactly like my pipeline. Of course vcpkg should be able do that by itself, or even better, implement some smarter ideas like those described here in this issue

Hi, i fixed this bug in my copy, now i'm checking it. If everything will be ok, i'll do pull request.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

cjvaijo picture cjvaijo  Â·  3Comments

PhilLab picture PhilLab  Â·  3Comments

F0I0l0I0P picture F0I0l0I0P  Â·  3Comments

cskrisz picture cskrisz  Â·  3Comments