fix(library): track installed packages per-console (no cross-console leak)#139
Merged
Conversation
…leak) The Install Package library wrongly showed a .pkg as installed on EVERY console once it was installed on any one of them. The per-package "installed" flag lived in the path-keyed metadata cache, but staged packages land at identical paths on every console — so a path-only flag couldn't tell consoles apart. Move the installed record into a per-host cache (bare host → set of installed paths). recordPkgInstalled(host, path) / isPkgInstalledHere(host, path) replace the path-only flag; the install paths and refresh now pass the console's host. The file-intrinsic path-meta cache (name/appVer/category) is unchanged — those are correctly shared across consoles. Adds 3 isolation tests (install on A doesn't mark B; host:port normalized). Release 3.3.19.
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.
Bug
Staging the same .pkg on multiple PS5s and installing it on one wrongly showed it as installed (Reinstall) on all of them.
Cause
The per-package "installed" flag (added in 3.3.15 for the update/DLC Reinstall badge) lived in the path-keyed metadata cache. Staged packages land at identical paths on every console (shared staging dir), so a path-only flag can't tell consoles apart — installing at
/data/.../foo.pkgon console A lit it up for every console with the same path.Fix
Move the installed record into a per-host cache (
ps5upload.pkg_library.installed.v1: bare host → set of installed paths). NewrecordPkgInstalled(host, path)/isPkgInstalledHere(host, path)replace the path-only flag; both install paths (library tab + upload-queue finisher) andrefresh()now pass the console's host (normalized viahostOf, so addr:port forms work). The file-intrinsic path-meta cache (name/appVer/category) is unchanged — those should be shared across consoles.Old (buggy, global) flags in the path-meta cache are simply ignored; the badge self-heals on the next install.
Tests
host:portnormalized to bare host; distinct paths tracked independently.Release 3.3.19.