Improve how ACLs are set to improve runtime performance - #1335
Draft
lrandersson wants to merge 1 commit into
Draft
Improve how ACLs are set to improve runtime performance#1335lrandersson wants to merge 1 commit into
lrandersson wants to merge 1 commit into
Conversation
lrandersson
commented
Aug 24, 2026
| if installer_type == InstallerTypes.MSI: | ||
| _run_uninstaller_msi(installer, install_dir) | ||
| else: | ||
| _check_permission_inheritance(base) |
Contributor
Author
There was a problem hiding this comment.
Added the ACL verification to extra_envs to ensure it's working as intended with additional environments as well (since we dont recurse the entire installation directory anymore).
lrandersson
force-pushed
the
dev-ra-fast-acl
branch
2 times, most recently
from
August 24, 2026 20:59
3da9679 to
78c03f2
Compare
lrandersson
force-pushed
the
dev-ra-fast-acl
branch
from
August 24, 2026 21:00
78c03f2 to
14ce017
Compare
lrandersson
commented
Aug 24, 2026
| """ | ||
|
|
||
|
|
||
| def write_fix_launcher_acls_bat(dir_path: str) -> None: |
Contributor
Author
There was a problem hiding this comment.
I tried to inline everything in the NSIS template but never got it to work with multiple environments.
To avoid making the NSIS template harder to read I thought the best is simply to combine the approach with Python.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
Setting installation directory permissions...step runsicacls /Tover all of$INSTDIR, which costs ~170 µs per file (~25 s for 150k files) even though only a few files actually needed fixing. This PR scopes it to one call per environment against that environment'sScriptsdirectory.Investigation into
condaOnly
Scriptsis affected because exactly one conda code path hard links from a shared template:LinkPathAction.create_python_entry_point_windows_exe_action, whose target is hard coded toScripts/{command}.exe. That template is the launcher stub insideconda-standalone's_MEI*directory, which is created with an explicit user-only ACE and no inheritance; since hard links share one security descriptor, every launcher inherits that broken ACL. All other candidate directories are ruled out in code —condabinandLibrary\binonly ever get fresh writes fromconda init,Library\usr\binnever gets generated files at all, andScripts\conda.exeis acopy().test_allusers_exeis our guard for a future regression if conda ever creates launchers elsewhere. Its guard is now extracted and also called fromtest_example_extra_envsto cover the per-environment loop, and it additionally asserts thatwindows_python_entry_point_exepaths exist and all live in aScriptsdirectory, this way the test cannot silently stop testing this.Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?