Hi,

On Mon, 15 Jul 2013, Steve Langasek wrote:
> Attached is a tested patch for this.  I'm not thrilled about invoking
> dpkg-query -S here, but I don't see any other way to get this information.

As suggested by Guillem, it's better to use "dpkg-query -L pkg | grep -q
-x /path" as you only have to load the file list of one package.

I also factorized the check in a single function and I merged the
resulting patch.

FWIW the pkg-tests test-suite still passes with those changes.

> It also still doesn't give perfect results; if a conffile moves from package
> x to package y, and package x is unpacked before package y, a modified
> conffile will be left behind as <conffile>.dpkg-bak and the pristine
> conffile from the new package will be unpacked in its place.  But I believe
> it is at least as good as the existing code in all cases.

Fixing this requires cooperation from the package taking it over so I
don't see it as a regression either.

There's a separate bug tracking this scenario anyway:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595112

> @@ -197,11 +231,23 @@ prepare_mv_conffile() {
>  finish_mv_conffile() {
>       local OLDCONFFILE="$1"
>       local NEWCONFFILE="$2"
> +     local PACKAGE="$2"

Here there was a small bug (caught by pkg-tests since I am calling
dpkg-query -L $PACKAGE).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to