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

Re: Can I simulate a weak conflict?



On Wed, 2005-07-27 at 11:22 -0600, Bruce Sass wrote:
> On Wed, 27 Jul 2005, Frank Küster wrote:
> > Nicolas Boullis <nboullis@debian.org> wrote:
> >
> > > Oh, and I just thought there could be a workaround. I could make a new
> > > no-udev empty package that conflicts with udev, and then write
> > > "Recommends: no-udev | udev (>= 0.060-1)".
> >
> > An elegant solution ;-)
> >
> > > I guess this would behave as expected, but I think that having one more
> > > package only for this would be quite insane!
> >
> > Especially because others would pick up the idea...
> 
> Can dpkg/apt/etc. be tweaked to automatically Provides: no-* ?

Two methods, one is not tenable:

(a) X conflicts with no-X implicitly
(b) When Y depends on no-X, if Y is installed, no-X is
  synthesised and installed too if it doesn't exist, 
  (and conflicting with X to prevent X being installed).

The dummy installation is mandatory because here
is the alternative, which is not tenable:

When installing X, scan all installed packages
to see if there is a dependency on no-X, if so
there is a conflict.

This is untenable because it requires scanning all
packages in your local database, whereas installation
of a package should only require looking up the 
listed dependencies.

The reason a logical 'X isn't installed' does not
work is that you could install Y, which depends 
on no X, and then just install X. Now Y is silently
broken by a package that knows nothing about Y.

The first technique works 'as if for each package X,
either X or no-X was installed' and is the same
as for the manual installation of a no-X package 
except it is handled by apt automatically and doesn't
require any no-X package in the repository (but
one must still be physically entered into your
local database).

The proof is by Shroedingers Cat:
either X or no-X is always physically installed
whenever you require a dependency, it is irrelevant
whether or not X or no-X is installed otherwise,
so the absence of one or the other is also irrelevant.
	
-- 
John Skaller <skaller at users dot sourceforge dot net>

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: