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

Re: using equivs to replace debian packages



"John L. Fjellstad" <john-debian@fjellstad.org> writes:

> I use equivs to replace debian packages, for lots of reasons (need a newer 
> version of a package, or in case of mta, I like to have better control of how 
> the qmail package is installed).
>
> The problem is that the already installed debian package is not removed when I 
> try to install my debian package, and the system complains about conflicts.
>
> For instance, I create my qmail package using the mta control file in 
> /usr/share/doc/equivs/examples.  When I try to install the new qmail package, 
> it won't uninstall exim and install my qmail package.  If I uninstall exim 
> first, then lots of other stuff gets uninstalled (mailx etc).  Right now, I 
> do a force install on my qmail package, and then uninstall exim, which works, 
> but isn't an optimal way to do it.
>
> What entries am I missing in the deb control file?  
> I try adding "Replaces" keyword, but it didn't have any effect.

The "problems" are the

  Replaces: mail-transport-agent
  Provides: mail-transport-agent
  Conflicts: mail-transport-agent

fields in exim's control file.  The intentional effect of these package
relationships is to force the removal of the existing
mail-transport-agent package before installing another one.

Really, the problem is that one can't, as far as I know, tell dpkg to
simultaneously remove a package and install another one.  aptitude,
apt-get, and probably other can do this, but they only work with package
archives.

So, you could create a local archive (see dpkg-scanpackages(8)) with the
equivs package, add it to your sources.list, then do "apt-get update;
apt-get install qmail exim-".

I think a far easier approach is to just force the removal of exim
without removing packages that depend on it and then install your qmail
equivs package.

-- 
I'm sick of being the guy who eats insects and gets the funny syphilis.

Attachment: pgpDeVBi8y38U.pgp
Description: PGP signature


Reply to: