Skip to content
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

building: MERGE: fix symlink bookkeeping #8124

Merged
merged 1 commit into from Nov 25, 2023

Conversation

rokm
Copy link
Member

@rokm rokm commented Nov 24, 2023

Implement separate bookkeeping for SYMLINK entries in the MERGE processing. With symlinks, we must track (dest_path, src_path) pairs instead of just src_path, because the src_path encodes the relative link destination, and might appear multiple times in different context. For example, on macOS, each Qt .framework bundle has a symlink Current -> A.

So if the bookkeeping is done only based on src_path, only one .framework bundle in first Analysis (where these bundles occur) retains its symlink in the binaries/datas TOC, while the rest are moved into dependencies TOC. This means that such executable unncessarily gains onefile copy/extraction semantics if dependencies are properly set to EXE (if it was originally a onedir executable); on the other hand, if dependencies are not passed on to EXE (mis-use of MERGE), the symlinks would end up missing in the otherwise unchanged executable.

Closes #8120.

Implement separate bookkeeping for SYMLINK entries in the MERGE
processing. With symlinks, we must track `(dest_path, src_path)`
pairs instead of just `src_path`, because the `src_path` encodes
the relative link destination, and might appear multiple times
in different context. For example, on macOS, each Qt .framework
bundle has a symlink `Current -> A`.

So if the bookkeeping is done only based on `src_path`, only one
.framework bundle in first `Analysis` (where these bundles occur)
retains its symlink in the `binaries`/`datas` TOC, while the rest
are moved into `dependencies` TOC. This means that such executable
unncessarily gains onefile copy/extraction semantics if
`dependencies` are properly set to `EXE` (if it was originally
a onedir executable); on the other hand, if `dependencies` are not
passed on to `EXE` (mis-use of `MERGE`), the symlinks would end up
missing in the otherwise unchanged executable.
@rokm rokm merged commit b2b188b into pyinstaller:develop Nov 25, 2023
18 checks passed
@rokm rokm deleted the fix-merge-symlink-bookkeeping branch November 25, 2023 12:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code signing on macOS fails on PyQt6 with "bundle format unrecognized" after upgrade from v5.13 to v6.2
2 participants