On Thu, May 09, 2019 at 09:22:56AM +0200, Ansgar wrote: > Also dpkg keeps metadata in /var, but changelogs, NEWS, copyright > documentation isn't variable state data and should be below /usr... The > same is really true for lists of files and maintainer scripts though.
It's a mess: * Most of the control tarball (to be exact: every file other than "control") goes to /var/lib/dpkg/info/$PACKAGE.$FILENAME; they're all (I've verified across all .debs in Buster) plain files of either mode 644 or 755. * Except for "control" which is sort of concatenated and dumped into /var/lib/dpkg/status, with "Status:" added. * On the other hand, /var/lib/dpkg/info/$PACKAGE.list is generated from the list of files in the data tarball. Knowing $PACKAGE requires reading the control tarball: if Multi-Arch is "same" (and no other value), $PACKAGE is "Package:Architecture", "Package" otherwise. The data tarball is unpacked into the filesystem mostly as-is, but you still need to obey diverts, replaces, and symlinks. Meow! (I'm reverse-engineering dpkg instead of reading the specs on purpose: in order to change the spec, what matters is current practice rather than the letter of documentation, often written 25 years ago before we settled on a subset of features.) -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Did ya know that typing "test -j8" instead of "ctest -j8" ⢿⡄⠘⠷⠚⠋⠀ will make your testsuite pass much faster, and fix bugs? ⠈⠳⣄⠀⠀⠀⠀