On 2012-11-20 20:08, Sven Joachim wrote: > On 2012-11-19 10:17 +0100, gator...@yahoo.de wrote: >> 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.
After I made a minimal test package (which worked as expected on all systems i tried) I eventually found the problem: My package name contained a hyphen ("-"), but in the "preinst" script I had used an underscore ("_") instead, so the diversion was created (almost) as intended, only for the wrong package ... ;-) >> 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. just out of curiosity: do you know any examples for this in wheezy? I had tried to find some, but all I could come up with were historic - in contemporary packages the preferred method seems to be via alternatives ... Regards, Peter -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/k8i9pg$v2s$1...@ger.gmane.org