Different types of Filesystems
By filesystem, I mean the way that packages are installed.
By the looks of things we're going to have to support 3 methods:
- OpenMW-style Virtual File System using a collection of directories, plus a file indicating their load order (what we currently do).
- Flat file system with file conflicts, for KSP (#229 (closed)) and also probably will be what's used for server-side tes3mp (#54 (closed)).
- A merged version of the VFS file system with overriding of files, for the original Elder Scrolls/Fallout engines (#209 (closed)).
I think the way we should handle this would be using a prefix-only config variable. E.g.
FILESYSTEM = "vfs"
FILESYSTEM = "flat"
FILESYSTEM = "merged-vfs"
I think that instead of there being a default setting, we should just require that this variable be set in the profile.
Implementation Details
This setting would not affect src_install
, but instead would affect the final installation in portmod.package.install_pkg
.
Obviously, when using the flat
filesystem the DATA_OVERRIDES
option would be meaningless, we wouldn't need to run any VFS sorting, and find_file
and list_dir
could either be replaced with trivial implementations, or banned completely in favour of direct access to the SYSROOT
(access to which could be provided in src_*
functions, though I'm not sure why the PMS specifies separate ROOT
and SYSROOT
).