Re: Getting rid of circular dependencies, stage 6
On Tue, 24 Oct 2006, Frank Küster wrote:
> Don Armstrong <email@example.com> wrote:
> > On Tue, 24 Oct 2006, Petter Reinholdtsen wrote:
> >> [Ian Jackson]
> >> > The only argument I've heard against circular dependencies as a
> >> > general rule is that they can trigger a particularly stupid (and
> >> > probably not very hard to fix) bug in apt,
> >> You seem to have missed the argument that packages with circular
> >> dependencies are impossible to install and configure in the correct
> >> (dependency) order, and thus will end up being installed and
> >> configured in a nondeterministic order instead. It is documented
> >> that dpkg try its best to find a sensible order for the packages,
> >> but it is bound to fail one way or another if two packages really do
> >> need each other to be configured before they are configured.
> > Packages which have circular dependencies and depend on the other
> > package being configured are buggy; at most they can depend on the
> > other package being unpacked. Since there is no way to specify this
> > kind of dependency, Depends: is as close as you can get.
> It seems to me that the solution in such situation shouldn't be a
> circular dependency with its "nondeterministic" behavior,
The end behavoir is only nondeterministic if the packages in the set
care what order they are configured in. If they do, that's a bug.
> but instead to separate one of the packages into two. For example if
> package b needs package a unpacked, but not configured, separate
> package a in a-data and a-therest, where a-data provides all that
> package b needs: Now b can depend on a-data, and a-therest can
> depend on b.
This is inherently fragile and requires a and b to be closely
cooperating packages; it also makes it difficult to define an
'a-therest' requires 'a-data' >> someversion dependency. (You'd have
to release a new version of b to do so.)
I'm all for removing unecessary circular dependencies, but hacking
around necessary circular dependencies is ugly. Far better to fix the
tools if they're unable to handle them properly.
Taxes are not levied for the benefit of the taxed.
-- Robert Heinlein _Time Enough For Love_ p250