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

Re: dpkg: overwriting file from other package fails despite diversion

On 2012-11-19 10:17 +0100, gator_ml@yahoo.de wrote:

> For a pretty complex system modification I need to replace binaries from
> several other packages by modified versions. Because I'll need to easily
> reproduce these modifications and would like to keep things as
> transparent as possible, I wrapped the necessary changes into a Debian
> package (I don't want to maintain modified versions of all the affected
> packages).
> In order to be able to overwrite "foreign" files without triggering a
> conflict, I install diversions for the files in question. As described
> in the policy manual
> (http://www.debian.org/doc/debian-policy/ap-pkg-diversions.html)
> I used ad "preinst" script with something like this:
>     dpkg-divert --package $our_package --add --rename \
>         --divert ${dest_name}.org ${dest_name}
> As intended, the original file versions are renamed before the actual
> installation. Nevertheless, "dpkg" complains about a conflict and aborts.

What are the exact error messages?  It might also be useful to invoke
dpkg with the "-D110" option to debug the problem.

> Was there any recent change compared to the policy manual? (I am doing
> this on wheezy). Did I get something wrong? To my understanding, this is
> pretty exactly the scenario, that is described in the manual ...

Also the one used by various Debian packages, so it can be assumed to
work in general, or there would have been bug reports.


Reply to: