fix(build): the object store's clean-up skips a folder it cannot read #487
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!487
Loading…
Reference in a new issue
No description provided.
Delete branch "jarynclouatre/Longshot:fix/object-store-prune-unreadable"
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?
Why
With
LONGSHOT_OBJ_STOREset, a folder in the store that cannot be listed (its permissions changed, or removed while the clean-up runs) makes a finished build fail: the game has compiled and installed, thenmake_game.pyexits 1 with aPermissionError(orFileNotFoundError) before shader preparation and "done".pruneinnx2/object_store.py(from #371) callsos.listdiron the store and on each folder outside anytry, andmake_game.py'smaincallsprunewithout a guard.share()already treats an unreadable store as a miss.What changed
nx2/object_store.py,prune): anOSErrorfrom listing the store returns(0, 0), one from listing a folder skips that folder; the other folders are cleaned as before. Compile and link errors still fail the build: they don't go throughprune.tests/test_object_store.py): a folder that vanishes between the two listings (through a stand-inos.listdir) beside a readable one with an old lone object:pruneremoves the readable one's object and does not raise. Off Windows and not as root, the same with a mode 000 folder, and a mode 000 store returns(0, 0). A store whose listing fails returns(0, 0), and a store root that is a file returns(0, 0).Flags and settings
None.
Measurements
main:
9c9d69ed(2026-11-14)this PR: fix/object-store-prune-unreadable @
9eb3f892Hardware: none used (game-free checks on a Linux x86-64 PC, Python 3.14)
Scene: none, nothing built
Method:
python3 -I -B tests/run_all.py --jobs 4, two runs each (main twice, then the branches of this batch in turn, twice). The new cases also ran against main'snx2/object_store.py.How to reproduce: the commands above in a checkout of each commit
9c9d69ed9eb3f892tests/run_all.py(run 1, run 2)test_bake_portability.py,test_walk_key.pytests/test_object_store.pyFileNotFoundError: [Errno 2] No such file or directory: '.../store/0000000000000003'test_bake_portability.pyfails here for a missing Python module (zstandard).test_walk_key.py's fixture doesn't link on main (undefined reference to hos_oot_autoload_input).Testing
Tested: the game-free suite on a Linux PC, as in Measurements.
Not tested: a full build with an unreadable store folder.
Needs other testers: None.
Screenshots
Nothing on screen.
Risk and rollback
A folder the clean-up cannot read is not cleaned; its objects stay until it can be read again. Reverting the commit puts the unguarded listing back.
Issues
None filed. Found reading
pruneafter #371.Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
mainand passing here.tests/that reads changed source updated in this PR, not weakened.WIP: fix(build): the object store's clean-up skips a folder it cannot readto fix(build): the object store's clean-up skips a folder it cannot readView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.