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

Re: Replaces and virtual packages



On Sun, 21 Oct 2001, Christoph Pfisterer wrote:

> 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.

If you are distributing this resultant binary, and you have patched dpkg, you
MUST make the source changes available.

On another note, has apple made their mods available?

> 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?

Replaces means a package replaces the files of another package.  Virtual
packages can't own files, so you can't replace them.  This is not a bug in
dpkg, but in what you are trying to do.

Additionally, passing -B(--auto-deconfigure) may be needed.

----BEGIN GEEK CODE BLOCK----
Version: 3.12
GCS d- s: a-- c+++ UL++++ P+ L++++ !E W+ M o+ K- W--- !O M- !V PS--
PE++ Y+ PGP++ t* 5++ X+ tv b+ D++ G e h*! !r z?
-----END GEEK CODE BLOCK-----
----BEGIN PGP INFO----
Adam Heath <doogie@debian.org>        Finger Print | KeyID
67 01 42 93 CA 37 FB 1E    63 C9 80 1D 08 CF 84 0A | DE656B05 PGP
AD46 C888 F587 F8A3 A6DA  3261 8A2C 7DC2 8BD4 A489 | 8BD4A489 GPG
-----END PGP INFO-----



Reply to: