fix(release): reject read-only Windows destinations before promotion #5459
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5459"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ideabsassistenza on 2026-10-13T20:14:23Z.
What
On Windows, an existing read-only release destination can fail replacement after earlier staged files have already been promoted. Blocking the ZIP leaves a new TAR with the old ZIP and executable; blocking the executable leaves both new archives with the old executable.
Reject a destination with the Windows read-only attribute during the existing preflight, before staging or promoting files. Inspect the destination itself with
lexists/lstat, including dangling symlinks, rather than following its target. A writable link to a read-only target remains replaceable and the target stays intact. POSIX read-only permission bits continue allowing replacement in a writable directory.The scope is this deterministic Windows attribute failure. This does not add general rollback for concurrent changes or later I/O failures. Related #674 concerns additional packaged assets; #5396 changes release workflow dependencies. No equivalent open fix found in refreshed release/packaging searches.
Tested
Rebased on 14 October 2026 onto main
daf256baab2987313fa18423939b7a7fb6304f31. Current headd8e6922acb2c6dc80ddb3f31cddc7066a0413734, tree8260d5f4e7144f9f3380643955dbecd1e9deb698. The only conflict was the packaging test imports; upstreamjsonand this PR'sstat/ctypeswere all preserved. Range-diff confirms no production behavior changes. Current-head Windows packaging suite: 23 discovered, 22 passed, one POSIX skip, 0.843 s; conventions and whitespace checks pass. The full tools suite was not rerun for this import-only rebase; the earlier full-suite results below remain historical for head66a798df2. No native/GPU/title tests or executable launches.Windows 11, CPython 3.12.14. Based on
a0f5916a293067ca840e835e58a8a55a0b764b4b; tested head66a798df252e4bdd27830182452b823d19da93f4, treef63dfcd7e6093e599c4e1fca26311b8f213f6b0a.exists().Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T19:49:56Z.
Checked the preflight change (
tools/package_release.py:46: Windows-onlylexists/lstatread-only attribute check, dangling links included) and the new regression tests against the code; build and ctest pass on Linux and the packaging suite passes (Windows-only cases skip here). Merging once the Windows job is green.