Skip to content

Conversation

@BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented Mar 5, 2025

The following exports improperly try to read from the packages tree rather than the installed tree. Example:

install_package_and_write_listfile(fs, paths.package_dir(action.spec), dirs);

Note how this calls package_dir for the spec and tries to copy from there, rather than from the installed tree.

This means they never tried to export from the correct place, and any packages that were, for example, restored from binary cache, would never be exported successfully. This was discovered trying to fix concurrent packages directory access problems in #802

Moreover, each has additional problems:

ifw is currently toast because it wants nonexistent tools:

PS D:\vcpkg> .\vcpkg.exe export zlib --ifw
The following packages are already built and will be exported:
  * vcpkg-cmake:x64-windows
    zlib:x64-windows
Additional packages (*) need to be exported to complete this operation.
Exporting maintenance tool...
A suitable version of installerbase was not found (required v4.4.0).
Downloading https://download.qt.io/official_releases/qt-installer-framework/4.4.0/installer-framework-opensource-src-4.4.0.zip -> installer-framework-opensource-src-4.4.0.zip
error: https://download.qt.io/official_releases/qt-installer-framework/4.4.0/installer-framework-opensource-src-4.4.0.zip: failed: status code 404

prefab has been broken for at least 4 years, see #1344 and #317

chocolately is closest to working, but as is can't even export vcpkg-cmake. This is before my changes:

PS D:\vcpkg> .\vcpkg.exe export zlib --x-chocolatey --x-maintainer Billy
The following packages are already built and will be exported:
  * vcpkg-cmake:x64-windows
    zlib:x64-windows
Additional packages (*) need to be exported to complete this operation.
Exporting vcpkg-cmake:x64-windows...
error: nuget failed with exit code: (1).
Attempting to build package from 'vcpkg-cmake.nuspec'.
Description is required.

I can workaround this failure by supplying a default description, but finding out that it can't even handle vcpkg-cmake is strong evidence that there are 0 users of this and trying to fix it is not worth the effort.

Other notes:

  • After this change the only callers of VcpkgPaths::package_dir are creating the install plan, removers trying to do 'purge', and the post-build-lint. This makes it easier to put each package in separate packages directories so they don't conflict with each other.

@BillyONeal
Copy link
Member Author

@BillyONeal
Copy link
Member Author

FWIW I don't think this blocks #802 and I will not worry about trying to fix them to work there, but it would be nice.

@BillyONeal BillyONeal requested a review from ras0219-msft March 5, 2025 20:14
@BillyONeal
Copy link
Member Author

I'm going to revert the drive-by part because there are Windows failures related to caps and slash that aren't worth resolving right now:
image

@BillyONeal BillyONeal force-pushed the export-no-package-dir branch from 8de79b6 to e852b51 Compare March 5, 2025 22:00
@BillyONeal BillyONeal enabled auto-merge (squash) March 5, 2025 22:07
@BillyONeal BillyONeal merged commit ef903c6 into microsoft:main Mar 5, 2025
6 checks passed
@BillyONeal BillyONeal deleted the export-no-package-dir branch March 5, 2025 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants