ATTENTION''' This entire document is basically a Work In Progress. With the vast number of GNOME packages to be worried about we are really starting to need an automated way to identify which packages require which other packages to be installed before they will work.
The idea is basically very simple. For each package we should be able to generate a list of which packages are also required to be installed for it to be of use.
It's worth making a note that unless we want to scan the entire system, resolve everything, and then spew everything out at once, we'll need to store the data we collect in other files as we scan each package. This is no fun at all when a test run takes >15 minutes to complete and may or may not just be spewing a lot of useless info at the end.
The sensible thing to do seems to be to start with a script that just analyzes what sonames (and possibly binaries) a given package requires, run that against everything to populate the simple databases in /var/cache/depinfo, and then have a second script that takes in that information and resolves all those to what packages they belong to.
We are not going to be concerning ourselves with secondary dependencies, i.e., those libraries that are listed as needed by libraries that our primary target needs. To do so would be counter-productive in that it would leave our results hopelessly entangled and opaque.
Under these directories we'll be storing everything in a filename that matches the package name itself exactly (like dbus-1.0.2-i486-3), so that if a package is replaced we won't be using stale dependency data.
/var/cache/depinfo - The root directory in /var/cache where we'll be storing everything.
/var/cache/depinfo/provides/sonames - This is where the sonames a package provides will go. Since these are not subject to the delicate mercies of variable symlinks and at what the system's linker actually looks at when it builds the caches, these would be the correct thing to use for accounting. The format of these files will contain two space-separated fields per line. The first field will be the soname, and the second field will be the location of the actual library providing the soname.
/var/cache/depinfo/provides/binaries - It's as yet unclear as to whether or not this will really be useful for fully automated reporting, but it will at least leave us with a database we can poll later if we need to manually declare a dependency on a particular binary name.
/var/cache/depinfo/requires/sonames - This will be where we will store the sonames required by a package.
/var/cache/depinfo/requires/binaries - This will be where we will store the filenames for things required by a package.
/var/cache/depinfo/requires/packages - This will be where we will store the package names required by a given package. For now, we'll only store the root name of a package ("dbus" and not "dbus-1.0.2-i486-3")
Package scanner - 85% complete, see http://dagmar.droplinegnome.org/experimental/dldepscan
Dependency resolver - nothing.