Vcpkg: Upgrade packages cant recover from previous failure

Created on 23 Apr 2020  路  4Comments  路  Source: microsoft/vcpkg

  • OS: Linux Ubuntu 18.04
  • Compiler: GCC 8.2.1

Steps to reproduce the behavior:
./vcpkg upgrade
then the upgrade should fail in the middle (for example, network issue)
./vcpkg upgrade again
no packages to upgrade

Failure logs

Building package upb[core]:x64-linux... done
Installing package upb[core]:x64-linux...
Installing package upb[core]:x64-linux... done
Elapsed time for package upb:x64-linux: 3.417 s
Starting package 57/110: protobuf:x64-linux
Building package protobuf[core]:x64-linux...
-- Downloading https://github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz...
-- Downloading https://github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz... Failed. Status: 22;"HTTP response code said error"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:175 (message):

  Failed to download file.
  If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
  variables to "https://user:password@your-proxy-ip-address:port/".
  Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
scripts/cmake/vcpkg_from_github.cmake:132 (vcpkg_download_distfile)
ports/protobuf/portfile.cmake:1 (vcpkg_from_github)
scripts/ports.cmake:90 (include)

Error: Building package protobuf:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: protobuf:x64-linux
Vcpkg version: 2020.02.04-unknownhash

Additionally, attach any relevant sections from the log files above.
user@machine:~/Development/vcpkg$ ./vcpkg upgrade --no-dry-run
All installed packages are up-to-date with the local portfiles.

vcpkg-feature

Most helpful comment

see https://github.com/microsoft/vcpkg/issues/4360
You can add --keep-going before/after the --no-dry-run and it continue to install all the ports/features except those dependent on the failed port.
FWIW I run the vcpkg upgrade without the --no-dry-run and capture the output to a text file where I can at least recover the missing packages after fixing the failed port.
Example:
.\vcpkg.exe upgrade 1>.\upgrade.log 2>&1
followed by
.\vcpkg.exe upgrade --no-dry-run --keep-going
If a port fails, I fix the issue if possible, but then I can do a
.\vcpkg.exe install <port/features> <port/features> ... --keep-going

All 4 comments

see https://github.com/microsoft/vcpkg/issues/4360
You can add --keep-going before/after the --no-dry-run and it continue to install all the ports/features except those dependent on the failed port.
FWIW I run the vcpkg upgrade without the --no-dry-run and capture the output to a text file where I can at least recover the missing packages after fixing the failed port.
Example:
.\vcpkg.exe upgrade 1>.\upgrade.log 2>&1
followed by
.\vcpkg.exe upgrade --no-dry-run --keep-going
If a port fails, I fix the issue if possible, but then I can do a
.\vcpkg.exe install <port/features> <port/features> ... --keep-going

nice workaround, but I think it simply should work :)

See #10654

Thanks for posting this issue. Closed as duplicate of #4360.

Was this page helpful?
0 / 5 - 0 ratings