Bug#774073: dh-make-perl: Ceating core module, install fails with "trying to overwrite foo which is also in bar"

Niko Tyni ntyni at debian.org
Sun Dec 28 12:51:39 UTC 2014


On Sun, Dec 28, 2014 at 12:19:32PM +0000, Andy Beverley wrote:
> Package: dh-make-perl
> Version: 0.75-1
> Severity: normal
> Tags: upstream patch

> When creating an updated version of a module that is already in core,
> the subsequent install fails (as expected) with a message such as:
> "trying to overwrite '/usr/bin/instmodsh', which is also in package
> perl 5.14.2-21+deb7u2".
> 
> Given that dh-make-perl has to be forced into creating core modules,
> I think it's appropriate to instruct dpkg that the package contains
> files that replace the core module. This patch does so.

Please note that a "Replaces" entry isn't quite enough for packages with
conflicting files to coexist cleanly: in case the replacing package
gets removed later, the conflicting file would then be gone from the
system altogether.

A more robust solution is using dpkg-divert in maintainer scripts to move
the core version out of the way and then back later if necessary. See
for instance the libmodule-corelist-perl package for an example
implementation.
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list