Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
building: ensure TOC de-duplication when dest_name contains pardir loops
Ensure that TOC is properly de-duplicated even if dest_name contains loops with parent directory path components. For example, `numpy/core/../../numpy.libs/libquadmath-2d0c479f.so.0.0.0` and `numpy/linalg/../../numpy.libs/libquadmath-2d0c479f.so.0.0.0` should be considered duplicates, as they are both normalized to `numpy.libs/libquadmath-2d0c479f.so.0.0.0`. Therefore, we now have the TOC normalization helpers to always sanitize the `dest_name` using `os.path.normpath` (with `pathlib` lacking the equivalent functionality), so that the entries are properly de-duplicated and that destination name is always in its compact/normalized form. We should probably also look into path normalization in the `bindepend.getImports` function, but at the end of the day, the TOC normalization serves as the last guard against problematic entries.
- Loading branch information
Showing
2 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters