Log calls to pkg-config
Julio M. Merino Vidal
jmmv84 at gmail.com
Sat Dec 24 04:41:06 PST 2005
[ please CC me any replies as I'm not subscribed to this list ]
A while ago I wrote a patch for pkg-config to log all executions
to a file. This patch is integrated in pkgsrc (the NetBSD's packages
collection), but maybe it'd be a good idea to make it part of the
As said, the aim of this patch is to log all "requests" to pkg-config
to a text file, which can later be inspected. Together with an
analysis script, we use this feature in pkgsrc to quickly determine
if a package correctly specifies its dependencies or not.
For example, if a program checks for "gtk-2.0 > 2.6.0" in its
configure script, we can automatically verify that our package
1) Has a dependency on gtk-2.0.
2) The dependency is greater than 2.6.0.
The patch adds a new environmental variable, PKG_CONFIG_LOG,
that takes a file name. If it is set, pkg-config will write to that file
all the queries made to it; otherwise it will behave as usual.
I have attached a (hand-edited) copy of our patch.
Do you like the idea? Do you think it'd be integrated into
pkg-config (thus simplifying our package maintenance)? If so,
I'll provide another patch to also update the documentation
wherever appropriate. If not... well, we'll keep it in our tree ;)
Julio M. Merino Vidal <jmmv84 at gmail.com>
The Julipedia - http://julipedia.blogspot.com/
The NetBSD Project - http://www.NetBSD.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1492 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/pkg-config/attachments/20051224/0485cb42/patch.bin
More information about the pkg-config