Harden SLR against "cleaner" tools that arbitrarily delete files
-
populate-depot: Fold ensure_ref() into minimize_runtime()
No functional change.
-
populate-depot: Fold write_lookaside() into minimize_runtime()
No functional change.
-
populate-depot: Fold prune_runtime() into minimize_runtime()
No functional change.
-
populate-depot: Rename files with multiple links or problematic names
Now that we're always constructing the runtime from a mtree manifest, the filename distributed via Steampipe and the filename we actually use don't necessarily have to line up. We can use this to solve two problems:
- Cleanup tools sometimes "helpfully" remove files that they think are
unnecessary, such as
**/__pycache__/*.pyc
. We can avoid these files getting deleted by disguising their filenames. - Some filenames might differ only by case, or contain characters that are considered invalid on Windows filesystems. Steampipe has essentially the same file naming rules as Windows, so it can't distribute such files, but we can unpack them onto native Linux filesystems.
We can also make use of this mechanism to save some space for files that are hard-links to each other, by only storing them once.
steamrt/tasks#422
Resolves: https://github.com/ValveSoftware/steam-for-linux/issues/10614
- Cleanup tools sometimes "helpfully" remove files that they think are
unnecessary, such as
Ready for review, but we cannot land this until !696 (merged) is (about to be) in a steam-runtime-tools release.