[spdx] Replace CMake variables in vcpkg_download_distfile()#1607
[spdx] Replace CMake variables in vcpkg_download_distfile()#1607BillyONeal merged 5 commits intomicrosoft:mainfrom
vcpkg_download_distfile()#1607Conversation
|
@BillyONeal I'm not sure how to handle the path issue: From microsoft/vcpkg#44188 (comment):
The code expects relative paths: Lines 381 to 386 in d034830 but we feed in absolute paths by including the port directory: vcpkg-tool/src/vcpkg/commands.build.cpp Line 1247 in d034830 vcpkg-tool/src/vcpkg/commands.build.cpp Line 1331 in d034830 vcpkg-tool/src/vcpkg/commands.build.cpp Lines 934 to 938 in d034830 However, I think we should be using absolute paths because we might lose the information of where a file comes from in case of overlay ports. On the other hand, absolute paths are invalid after downloading from a binary cache on different machines. |
Right, this is why the paths have to be relative.
That's why the SHAs of the files are also in the SPDX. It isn't there's a hard link between any particular absolute path and anything else, any more than there is between that relative path and anything else. |
BillyONeal
left a comment
There was a problem hiding this comment.
Can you add a test? Would merge this with one.
Hi @BillyONeal, I added a unit test to check the correct replacement of As you proposed, I didn't fix the absolute path issue mentioned in microsoft/vcpkg#44188. Therefore, plese don't close that issue yet - I will fix the absolute path issue in a different PR. |
…ix-spdx-distfile
Partially fixes microsoft/vcpkg#44188
Fixes microsoft/vcpkg#44040