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

Re: Bug#2655: ld.so includes header file, clashes with old libc



David Engel writes ("Re: Bug#2655: ld.so includes header file, clashes with old libc"):
...
> Perhaps you should redescribe exactly what Replaces does.  I thought
> it was only to be used when one package totally takes the place of
> another.  What else is it for?  Turning on --force-overwrite for
> selected packages?

Replaces has two effects, which are distinct and both of which are
enabled with the one field.  One of them generally only occurs when
packages don't conflict, and one of them only occurs when they do,
which is why conflicts are relevant.

The first effect of replaces is to selectively allow file overwriting:
if you're installing package A and it says `Replaces: B' then dpkg
will not complain at all if A contains some files that are currently
installed and part of B.  Instead it will remove the file(s) in
question from the list of files belonging to B, and install A's
version(s).

In practice this effect is used when the packages do not conflict,
since if they did you wouldn't be installing both.  However, if you
were to use --force-conflicts you'd find that this effect of Replaces
did occur.

The second effect occurs if you are installing A, which says
`Conflicts: B', but you have B installed and B hasn't been marked for
removal.  Usually this will make dpkg bomb out.  However, if A says
`Replaces: B' _as well as_ `Conflicts: B' then dpkg will ignore the
fact that B wasn't marked for removal and remove it in favour of A
anyway.

Ian.



Reply to: