Request for review: libpqxx

Michael Schwendt bugs.michael at gmx.net
Fri Jul 1 12:42:56 UTC 2005


On Fri, 01 Jul 2005 12:42:08 +0200, Andreas Bierfert wrote:

> > As a rule of thumb: whenever a -devel package contains a foo-config
> > executable or a pkg-config file, these are worth examining for dependencies
> > on other -devel packages. If no foo-config program or pkg-config file
> > is included, it may need more effort to examine included C/C++ headers
> > for dependencies.
> 
> Is this a policy?

I hope so.  And if it isn't a policy already, it ought to become one.

The rationale is this, roughly:

If you, as a software developer, want to use the libfoo API, you install
libfoo-devel. That should be enough. You should not need to go through the
tiresome process of noticing that headers from libfoo-devel include
headers from libbar-devel, and headers from libbar-devel need
libbaz-devel, and so on. Maybe the next version of libfoo accesses another
library's headers, although you still use only libfoo directly. If there
is a foo-config helper script, which returns compiler/linker options which
are needed for building with libfoo, it should work out-of-the-box and
not fail, because something's required but missing.

Similarly, if you use pkg-config for your project, you want that checks
like "pkg-config --exists libfoo" return true if libfoo is
available. However, pkg-config files have dependencies (they are called
"Requires:", too, inside the files, btw) on other pkg-config files and
hence on other packages. And pkg-config fails if such dependencies are
broken, and e.g. the linker options returned by "pkg-config --libs libfoo"
would fail because of missing libraries, or "pkg-config --cflags libfoo"
would return several compiler options for locations in where to search for
needed headers from library dependencies.

As a packager, you see your package, which had been working fine for a
long time due to complete build requirements, break badly all of a sudden,
because of a broken pkg-config dependency chain somewhere. Bug #161688 as
an example. Assumedly all GTK+ v2 packages broke due to incomplete
dependencies in "cairo-devel", although hardly any of the packages need
cairo-devel directly.

> I don't know... I reather would think if somebody needs to use
> the devel package that somebody would need to install the libs to and not do it
> automatically via Requires. That is why they where missing in the first place in
> my spec... I don't care one way or the other myself both is perfectly ok... it's
> just a question of consistancy between all packages... :)

Either there is a dependency or there is none.

-- 
Michael Schwendt <mschwendt at users.sf.net>
Fedora Core release 3 (Heidelberg) - Linux 2.6.11-1.35_FC3
loadavg: 1.00 1.07 1.07




More information about the fedora-extras-list mailing list