Libraries and packaging problem

Claudio Matsuoka claudio at mandriva.com
Wed Mar 29 11:30:46 PST 2006


Hi,

Mandriva has recently released experimental xorg packages built from the 
modular sources, and we noticed a problem in dependencies: nearly all rpm 
packages were directly depending on packages they shouldn't depend. These 
dependencies were added because pkgconfig cascades linker flags from x11 to 
most libraries that use x11 through Requires.private, e.g.

Name: Xpm
Description: X Pixmap Library
Version: 3.5.4.2
Requires: x11
Requires.private: x11
Cflags: -I${includedir}
Libs: -L${libdir} -lXpm

In the end, binaries linked against libXpm are also linked directly to libXau 
and libXdmcp. http://distro.conectiva.com.br/~claudio/xorg/xman.png shows an 
example, lots more at http://distro.conectiva.com.br/~claudio/xorg/.

The problem in doing so is that if anything is changed in the dependency 
layout in such a way that a library is no longer needed or a new version is 
required, a new release of all packages that require this library will be 
also needed (defeating the upgrade granularity we gained with the modular 
source layout). It also breaks the concept of hierarchy in dependencies, 
making the top-level package directly depending on everything it needs.

Is there a reason to make top-level binaries directly depend on all libraries 
it uses, directly or indirectly? Otherwise, the pkgconfig .pc files could be 
fixed to list only the libraries directly needed by the package, and let the 
linker follow the chain to find what it needs.


More information about the xorg-modular mailing list