mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 13:20:42 +00:00
Multiple methods held a read or write lock on self.index while calling fallback methods that also needed to acquire locks, causing deadlocks: - get_obsoleted_package_metadata: read lock held during filesystem fallback that calls update_index_entry (write lock) - get_obsoleted_package_manifest: same pattern - remove_obsoleted_package: write lock held while calling build_index (also needs write lock) - search_obsoleted_packages: read lock held during fallback Fix: scope all lock acquisitions in blocks so locks are dropped before calling any method that may also acquire a lock. For remove, extract a needs_rebuild flag set inside the lock scope, then call build_index after release. All 95 libips tests now pass (previously 3 hung indefinitely). |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.toml | ||