In the pkgsrc package system, each package comes with a PLIST file which describes the files and directories that belong to it. Its contents are used at deinstallation time to cleanly remove the package from the system, among other tasks.
Now you may be scared because this looks like a real maintenance nightmare (it used to be, though). Almost all other packaging systems do not have such static lists; instead, they are automatically generated at installation time (only when installing from the sources) and stored inside the binary package.
Even though, there are good reasons to keep static lists:
- You can search for a file in all available packages without having to install them. This is useful, for example, when you need a header file and you don't know where it is; a simple cd /usr/pkgsrc; grep file_name */*/PLIST* will do the trick. With dynamic lists, this can be implemented by having a machine that builds all available packages and builds a database with all available files.
- If the package installs more (or less) files than expected, pkgsrc will emit an error to let you know that something bad happened. (Well, this is not completely true until we have staged installs... which I'm interested in implementing.) It is difficult (if not impossible) to implement this if you only have dynamic lists.
These are the main two reasons, although I recall that there are some other minor ones. And, as we have to maintain these lists, pkgsrc includes several tricks to make the process easier: for example, the print-PLIST target produces an almost-exact list - which can be made exact if you use the PRINT_PLIST_AWK extensions.