-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vcpkg export requires packages directory #9781
Comments
Hmm, both
call I think we should call something like In my mind, at least, the natural sequence of steps for a
...where every step should only rely on files from a previous step, I think. And I also consider the directories in points 1-3 to be temporary that could be deleted at any time based on the behaviour and help description of the Please let me know what is the best way to proceed, and I am happy to send a PR with the necessary changes. |
…1015) * [vcpkg] Fix issue #9781 by exporting from the installed directory * [vcpkg] Address code review comments for #11015 * [vcpkg] Remove duplicate triplet in installed path from exports Co-authored-by: Robert Schumacher <[email protected]>
…ctory (microsoft#11015) * [vcpkg] Fix issue microsoft#9781 by exporting from the installed directory * [vcpkg] Address code review comments for microsoft#11015 * [vcpkg] Remove duplicate triplet in installed path from exports Co-authored-by: Robert Schumacher <[email protected]>
…ctory (microsoft#11015) * [vcpkg] Fix issue microsoft#9781 by exporting from the installed directory * [vcpkg] Address code review comments for microsoft#11015 * [vcpkg] Remove duplicate triplet in installed path from exports Co-authored-by: Robert Schumacher <[email protected]>
As in issue microsoft/vcpkg#9781 and merged pull request microsoft/vcpkg#11015 , vcpkg doesn't use `packages` dir for either installing or exporting. Since now disabling binary cache, directory `installed` should be used.
Describe the bug
The
vcpkg export
command fails if thepackages
directory (under the vcpkg root directory) does not contain the to-be-exported package. If youvcpkg install
a package with the--clean-after-build
switch, thepackages
directory is not going to be present after a successful install.Environment
To Reproduce
Using the
flatbuffers
library as an example, you can use any other libraries if you want, the results should be the same. Example steps to reproduce the behavior with ax64-windows
triplet (the triplet itself is irrelevant):.\vcpkg remove flatbuffers:x64-windows
.\vcpkg install flatbuffers:x64-windows --clean-after-build
.\vcpkg export flatbuffers:x64-windows --raw --output="vcpkg-export-flatbuffers"
Source directory C:/workspace/vcpkg/packages/flatbuffers_x64-windows does not exist
(assuming your vcpkg root is atC:/workspace/vcpkg
).Results are the same with any of the other export types: "--nuget --ifw --zip --7zip".
Expected behavior
The
vcpkg export
command in the above should succeed even if thepackages
directory is not present in the vcpkg root directory. If you omit the--clean-after-build
switch (packages
directory remains intact), the export command succeeds:.\vcpkg remove flatbuffers:x64-windows
.\vcpkg install flatbuffers:x64-windows
.\vcpkg export flatbuffers:x64-windows --raw --output="vcpkg-export-flatbuffers"
Failure logs
Additional context
I do not think that the
packages
directory should be necessary to perform a successful export operation. Theinstalled
directory in the vcpkg root directory has all the necessary information (assumingx64-windows
triplet for the sake of an example):installed/x64-windows
directory has all the installed binaries and headers at one place.*_x64-windows.list
files underinstalled/vcpkg/info
have all the information describing what files in theinstalled/x64-windows
directory belong to a given library.E.g. on my machine right now, the
installed/vcpkg/info/flatbuffers_1.11.0-1_x64-windows.list
file contains the following:The text was updated successfully, but these errors were encountered: