Replaces and virtual packages
- To: debian-dpkg@lists.debian.org
- Subject: Replaces and virtual packages
- From: Christoph Pfisterer <cp@chrisp.de>
- Date: Sun, 21 Oct 2001 18:41:55 +0200
- Message-id: <p05101000b7f8a43efd3e@[192.168.2.8]>
Hi!
While trying to set up a group of packages to be mutually-exclusive,
I've come across what I think is a bug in dpkg. First, some
background: I'm using dpkg 1.9.17 on Mac OS X (a.k.a. Darwin) in the
Fink project (http://fink.sourceforge.net). Fink has its own source
package format, but uses dpkg to install binary .deb packages (and
dpkg-deb to create them). I can provide the complete set of patches
used as well as example .deb packages if requested.
The Debian Policy Manual (version 3.5.6.0 from 2001-07-24) mentions
in section 7.5.2 that alternative and mutually-exclusive packages can
be set up using a virtual package name and gives the following
example:
Provides: mail-transport-agent
Conflicts: mail-transport-agent
Replaces: mail-transport-agent
Unfortunately, I can't get this to work with dpkg 1.9.17. To isolate
the problem, I made two packages, test-a and test-b, that both
contain these declarations:
Provides: test-c
Conflicts: test-c
Replaces: test-c
When test-a is installed, the expectation is that I can run 'dpkg -i
test-b_....deb' and it will remove test-a in favor of test-b. (This
actually works when only real package names are used for Conflicts
and Replaces.) However, with the above I get this:
[...]
dpkg: regarding .../test-b_1.0-1_darwin-powerpc.deb containing test-b:
test-a conflicts with test-c
test-b provides test-c and is to be installed.
dpkg: error processing
/sw/fink/dists/local/main/binary-darwin-powerpc/test-b_1.0-1_darwin-powerpc.deb
(--install):
conflicting packages - not installing test-b
[...]
So somehow dpkg doesn't evaluate the Replaces field correctly in this
case. Is this a bug? Or am I missing something important and it's
actually a feature? Could it be related to something obscure, such as
the ordering of the fields in the control file?
Any help is appreciated.
-chrisp
--
chrisp a.k.a. Christoph Pfisterer "Any sufficiently advanced
cp@chrisp.de - http://chrisp.de bug is indistinguishable
PGP key & geek code available from a feature."
Reply to: