Re: Getting rid of circular dependencies
Josselin Mouette <email@example.com> writes:
> Le vendredi 24 juin 2005 à 17:21 +0200, Bill Allombert a écrit :
>> I see two easy case:
>> 1) foo and foo-data. There is usualy no reason for foo-data to depend on
>> foo. foo-data does not provide user-visible interface, only data, so it
>> does not need to depend on foo.
>> 2) libfoo and foo-bin, where foo-bin include binaries linked with
>> libfoo. Usually libfoo only need to Depends on configuration data
>> in foo-bin and not on any binaries linked with libfoo (to avoid infinite
>> recursion). In that case it should be possible to split foo-bin in
>> foo-bin and foo-common, and change libfoo to depend on foo-common
> How would you treat the librsvg case? Currently, librsvg2-2 and
> librsvg2-common both depend on each other. The librsvg2-2 package
> contains the library, and librsvg2-common contains a loader that allows
> gdk_pixbuf to load SVG files.
> * librsvg2-common needs to depend on librsvg2-2 because it links to the
> * librsvg2-2 depends on librsvg2-common because most applications
> linking to librsvg2 also expect the SVG loader to be available.
So on all systems both packages will always be installed together. Why
have two packages at all? I would call this a useless split of
I'm guessing the split is so different librsvg library versions can be
installed in parallel without the SVG loaders colliding. But doesn't
that cause problems when the app and loader use different libs?
Also for multiarch support you will need multiple SVG loaders to be
installable in parallel.
> Similarly, how would you treat the fontconfig case? Currently,
> libfontconfig1 contains the library, while fontconfig contains the
> shared configuration and support binaries (including fc-cache).
> * fontconfig depends on libfontconfig1 because it links to it;
> * libfontconfig1 depends on fontconfig because the applications using
> libfontconfig1 are almost unusable if fc-cache isn't run in the font
fontconfig: Depends: libfontconfig1
libfontconfig1: no depends
Add fontconfig to the libfontconfig1.shlibs file.
After all packages have been rebuild you get what you want.
> The libgtk2.0-0/libgtk2.0-bin case is very similar: without running
> update-gdkpixbuf-loaders, applications using libgtk2.0-0 won't work.
Same case as the SVG loader. Merge the two.
> The gconf package contains a daemon that links to libgconf2-4. However
> applications linking to libgconf2-4 will require that daemon to be
> installed. The same holds for libgnomevfs2-common/libgnomevfs2-0.
Same case as fontconfig, add gconf to the shlibs file.
> In short, there are cases where circular dependencies are needed. Fixing
> the problem means fixing the tools, not the packages. (Which doesn't
> mean we shouldn't fix packages when it's possible; the GNOME
> panel/session/nautilus/control-center mess was fixed, for example.)