[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: upstream advise page about circular dependencies (bootstrapping)


On Tue, Feb 12, 2013 at 04:58:46PM +0000, Simon McVittie wrote:
> Either GLib or pkg-config should document how you can avoid this cycle
> by doing a "stage 1" build of one project or the other.

You assume a dependency cycle between the src:pkg-config and
src:glib2.0. But instead I wrote that the cycle was:

libglib2.0-dev -> src:pkg-config

So the only involved source package involved in the cycle is
src:pkg-config. To break the cycle, src:pkg-config has to be built
without libglib2.0-dev.

Even if a native version of libglib2.0-dev was magically appearing from
somewhere (for example by compiling src:glib2.0 without pkg-config as
you explained) it would *not* break this dependency cycle because
libglib2.0-dev would still depend on pkg-config which can only be
compiled if src:pkg-config can be compiled. And src:pkg-config can't be
compiled because it depends on libglib2.0-dev which we compiled
beforehand but we can't install it.

I also fell into the same trap countless times during the first weeks of
my GSoC last year. :)

A dependency cycle between two source packages (as you mentioned) would
always be of length four because in between both source packages there
would be a set of binary packages. Example:

src:doxygen -> libqt4-dev -> src:dbus -> doxygen

This gives two possibilities to break the cycle: the dependency of
src:dbus on doxygen or the dependency of src:doxygen on libqt4-dev.

cheers, josch

Reply to: