diff -Nru dpkg-1.18.4ubuntu1.1/debian/changelog dpkg-1.18.4ubuntu1.2/debian/changelog --- dpkg-1.18.4ubuntu1.1/debian/changelog 2016-05-12 12:39:47.000000000 +0200 +++ dpkg-1.18.4ubuntu1.2/debian/changelog 2017-03-17 08:47:33.000000000 +0100 @@ -1,3 +1,12 @@ +dpkg (1.18.4ubuntu1.2) xenial; urgency=medium + + * src/archives.c: + - handle a conffile moving from pkg-a to pkg-b correctly when + dpkg --root=/dir is used. Thanks to Guillem Jover. + LP: #1673247 + + -- Michael Vogt Fri, 17 Mar 2017 08:47:33 +0100 + dpkg (1.18.4ubuntu1.1) xenial; urgency=medium * Add Breaks on ufw (<< 0.35-0ubuntu2~) for trigger loops (LP: #1571174) diff -Nru dpkg-1.18.4ubuntu1.1/src/archives.c dpkg-1.18.4ubuntu1.2/src/archives.c --- dpkg-1.18.4ubuntu1.1/src/archives.c 2015-12-12 21:49:37.000000000 +0100 +++ dpkg-1.18.4ubuntu1.2/src/archives.c 2017-03-17 08:47:20.000000000 +0100 @@ -853,14 +853,7 @@ conff = conff->next) { if (!conff->obsolete) continue; - if (stat(conff->name, &stabtmp)) { - if (errno == ENOENT || errno == ENOTDIR || errno == ELOOP) - continue; - else - ohshite(_("cannot stat file '%s'"), conff->name); - } - if (stabtmp.st_dev == stab.st_dev && - stabtmp.st_ino == stab.st_ino) + if (strcmp(conff->name, nifd->namenode->name) == 0) break; } if (conff) {