[pacman-dev] When pacman reads local database files

Allan McRae allan at archlinux.org
Sun Oct 23 03:37:20 UTC 2016


Hello everyone,

We have had some discussion about that local database and how it could
be improved.

I thought it would be useful to have a summary of what options touch
what files in the local db:


-R <pkg>
all "desc" files
single "files" file

-S (something that installs a package...)
all "desc" files
single/multiple "files" files during package upgrades


-Q stuff:

-c <pkg>  -> single "changelog" file per package
-l <pkg>  -> single "files" file per package
-k <pkg>  -> single "files/mtree" file per package
-kk <pkg> -> single "mtree" file per package

-d, -e, -g, -i, -m, -s, -t, -u
all "desc" files

-l, -o (, -k)
all "files" files

-c
all "changelog" files

-kk (, -k)
all "mtree" files


What can we conclude from this?

1) no operation reads a single "desc" file
2) -Qo is the only operation to gain from efficient reading of all
"files" files.  (-Ql may also gain, but is probably output bound)
3) having "desc" and "files" files separate and only loading these files
if we need it is a gain.
4) all operations on mtree files require lots of disk access, so there
is not much gain in increasing the efficiency of reading these.

Allan


More information about the pacman-dev mailing list