mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #866] [CLOSED] spirv_stubs: restore write mode before remove on replace failure and publish mode (SPIRV-STUBS-STAGE-CLEANUP) #904
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#904
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/866
Author: @trigger337
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:fix/spirv-stubs-stage-cleanup📝 Commits (1)
612e1d1spirv_stubs: restore write mode before remove on replace failure and publish mode (SPIRV-STUBS-STAGE-CLEANUP)📊 Changes
2 files changed (+27 additions, -5 deletions)
View changed files
📝
tests/test_spirv_stubs.py(+19 -0)📝
tools/spirv_stubs.py(+8 -5)📄 Description
Overview
In
tools/spirv_stubs.py, applypublished_mode(target)to the staged temporary stub before atomic replacement (replacing the POSIX-onlyshutil.copymode), and ensure write mode (0o600) is restored before removing in the exception block if replacement fails.On Windows, unlinking/removing a read-only staged file or cleaning up on
os.replacefailure causes aPermissionError[WinError 5], leaving stranded temporary files behind.Changes
tools/spirv_stubs.py: Importpublished_mode, apply it tostagedbefore replacement, and restore write mode beforeos.removeinexcept BaseException:.tests/test_spirv_stubs.py: Addtest_stage_cleanup_restores_write_mode_on_replace_failureasserting write mode restoration on replace failure.agent: yes
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.