Robert P. J. Day wrote:
undoubtedly a simple question, but a friend asked me about this
yesterday, and threw a wrinkle into it. (i'm running on fedora 30
branched but that should make no difference.)
if i ask for the package dependencies of, say, httpd, among
everything else, i get the line:
config(httpd) = 2.4.38-4.fc30
These virtual provides and requires are added automatically
by rpm when the package has any files marked as %config. It
must (or should) be documented somewhere more properly, but
all I found quickly was the entry in the CHANGES file when
it was added (in rpm-4.2):
- add matching "config(N) = EVR" dependencies iff
%%config is found.
said friend then asked, "can a package have, as a dependency,
config files of some *other* package?" i had to think about that, and
admitted i wasn't sure, as that sounded like a strange dependency, as
i would think the first package would simply depend on the second
package in its entirety, not just on its config files, but i wasn't
Another package could have a dependency on that virtual
provides. In common practice it has no difference to
depending on httpd, I can't say I recall seeing such a dep
It would be useful if you had a package that needed the
httpd config files and wanted to continue to work in case
the config files were moved to a different package (say they
were split into a subpackage or something).
I think it's more common that a package might care about
having the httpd conf.d directory so it can install a file
there to add some optional functionality, but doesn't care
if httpd isn't available. We have the httpd-filesystem
package for that now.
You may be able to find more details in the rpm list
archives from the time this was added (around 2002 or so).