Vcpkg: Installing a port using --head fails if that port hasn't been previously installed

Created on 15 Feb 2020  路  4Comments  路  Source: microsoft/vcpkg

Describe the bug
Running .\vcpkg.exe install {port} --head for a port which has never been previously installed (and therefore the buildtrees/{port} folder does not exist) fails.

Environment

  • OS: Windows
  • VCPKG: 1be75a28bfce2084bb0b59ec92a6853f13d7be66

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/microsoft/vcpkg vcpkg_repro
  2. cd vcpkg_repro
  3. .\bootstrap-vcpkg.bat
  4. .\vcpkg.exe install {port} --head (nethost is one example)

Expected behavior
The port should download and attempt to build.

Actual behavior
The port fails to download due to

Failed to open 'C:\Users\tagoo\source\repos\vcpkg2\buildtrees\nethost\stdout-x86-windows.log' for writing

Failure logs
vcpkg_repro.txt

Additional context
Any scenario where the folder already exists allows the install to succeed.
This includes installing a non --head version or manually creating the folder.

vcpkg-bug

Most helpful comment

Hi guys, I've fixed this issue in #10287, please update vcpkg and retry again.

Thanks.

All 4 comments

I can confirm this bug on linux as well.

@LilyWangL I am unsure how the label "vcpkg feature" fits here... This is probably more of a regression (installing ports with --head did work properly before!).

@Squareys This is a VCPKG bug. Jack will fix it in pull request.

Hi guys, I've fixed this issue in #10287, please update vcpkg and retry again.

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

angelmixu picture angelmixu  路  3Comments

jasjuang picture jasjuang  路  3Comments

cskrisz picture cskrisz  路  3Comments

husseinalihazime picture husseinalihazime  路  3Comments

invy picture invy  路  3Comments