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

Bug#1050322: Partial versus complete replacement of a package by another



On Wed, Aug 23, 2023 at 09:22:41AM +0200, julien.puydt@gmail.com wrote:
> Package: debian-policy
> Version: 4.6.2.0
> Severity: normal
> 
> Hi,
> 
> over at bug #1050027 there is a discussion of applicable policy when
> splitting a package. I'll first explain what the bug is about and then
> why that's a problem with the Policy.
> 
> The src:mathcomp-analysis package provided a single binary package
> libcoq-mathcomp-analysis until 0.6.3-2 ; with 0.6.4-1, it's now
> providing two binary packages libcoq-mathcomp-analysis and libcoq-
> mathcomp-classical. The binary package libcoq-mathcomp-analysis Depends
> on libcoq-mathcomp-classical (= ${binary:Version}). And with 0.6.4-1,
> that Depends was the only information, so of course file conflicts
> weren't handled correctly, and that is what #1050027 is about.
> 
> In src:mathcomp-analysis 0.6.4-2, I declared that libcoq-mathcomp-
> classical Breaks libcoq-mathcomp-analysis (<< 0.6.4) and closed the
> bug. It was swiftly re-opened because I hadn't used Breaks+Replaces
> according to Policy 7.6.1. But I don't want to use Replaces as libcoq-
> mathcomp-classical isn't a *complete* replacement for libcoq-mathcomp-
> analysis (<< 0.6.4) -- it only provides a small part of it!
> 
> 
> So what does the Policy actually say?

The main purpose of Replaces: is that dpkg normally does not allow two different packages
to provide the same files. When the second package is installed dpkg will issue an
overwrite error, unless the second package has the same name as the first or when
the second package Replaces: the first.

Mostly there are two cases:
1/ you decide to move the file /usr/share/foo/data from foo to foo-data:
foo-data needs to Replaces: foo for at least one release.

2/ you decide to rename the package foo to foo1:
foo1 need to Replaces: foo for at least one release.

Cheers,
Bill


Reply to: