Skip to content

Conversation

BillyONeal
Copy link
Member

#1744 introduced a lot of regressions into how vcpkg installs ports, particularly around handling symlinks and files we can't read.

Previously, all calls to the filesystem looking at the packages tree explicitly ignored errors. However, in #1744 recursive directory enumeration and opening the files to write hashes was added with the "crash on error" VCPKG_LINE_INFO forms.

This exposed some latent bugs in how we handle symlinks in recursive enumeration (which is good!).

Resolves the 'fastdds' failures observed in microsoft/vcpkg#47130

Note that the POSIX version of these functions already filter for ENOENT and ENOTDIR:

                                    if (::stat(full.c_str(), &s) != 0)
                                    {
                                        if (errno == ENOENT || errno == ENOTDIR)
                                        {
                                            ec.clear();
                                        }
Hopefully fixes:

error: open_for_read("/mnt/vcpkg-ci/p/salome-configuration_x64-linux/share/salome-configuration/copyright/modules.info"): Permission denied
@BillyONeal
Copy link
Member Author

Proof 1 Proof 2

Examples of what the added test does before the fixes. I don't know how to reasonably add a test for the 'permission denied' repro case on Linux but I hope just adding paranoia around that is OK.

@BillyONeal BillyONeal merged commit bc1a57d into microsoft:main Sep 3, 2025
7 checks passed
@BillyONeal BillyONeal deleted the symlinks-fix branch September 3, 2025 19:32
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