- fakechroot throws it's own curveballs into the already mixed up thing,
copy things to the test dir and set chroot base to that to avoid
confusion with cwd and such
- klunky and ugly but at least the tests pass now when running non-root
- few files are actually symlinks so this is very sparse data
- per-rpmfi instead of global as link target names are not that likely
to be shared across packages
- another few megs saved...
- there's only a very limited number of language names ever present,
and most files don't have languages attached at all
- another few megs saved on memory
- User and group names contain an enormous amount of redundancy: typically
most files and directories are owned by root:root. Store the each unique
name just once into global cache and store indexes to the cache into
rpmfi user + group arrays. This saves several megabytes of memory on
a transaction of non-trivial size...
- The cache implementation is dumb, but it's not noticeably slower than
uncached version, copying megs of strings around is not cheap either.
Easy enough to replace with a hash-table or such if performace becomes
and issue...
- Save rpmfi iteration index on entry, restore on exit to avoid clashing
with other users of the given file info set. For now...
- Remove unnecessary re-initialization of uid and gid in case not found
- lazy allocation on set, otherwise there's no replaced size - the getter
deals with this transparently
- saves a fair bit of memory, by no means everything has replaced files...
- permit fine grained control over what's loaded into fi for what operations,
non-trivial memory savings are possible
- future possibilities - these reflect closely to rpm verify control
bits, all we need is RPMFI_DISK or similar operation to pull the
information from disk instead of header and then verify can simply
compare two rpmfi's
- it only ever returns NULLs because there are no security contexts in
headers (and having them in headers make no sense as the context varies
based on whatever selinux policy happens to be active on the target
system)
- instead of directly accessing the array from fsm, use a helper function
which lazily allocates the state array as needed and sets state
- also fixes the silly case of non-installed packages showing their files
as "normal", ie installed (now it shows "no state" as it's not relevant)