commit 64c51324c656612bda90eef71643ddfad94e3288 Author: Raphaƫl Hertzog Date: Thu Dec 15 10:28:30 2011 +0100 dpkg: do not try to disappear other packages from the same set Packages within a set can rightfully share files and should not be disappeared in the case where they share all the files! Closes: #652063 Reported-by: Martin Pitt diff --git a/src/archives.c b/src/archives.c index e32185a..cf1dd0e 100644 --- a/src/archives.c +++ b/src/archives.c @@ -152,6 +152,13 @@ filesavespackage(struct fileinlist *file, if (thirdpkg == pkgbeinginstalled || thirdpkg == pkgtobesaved) continue; + /* A Multi-Arch: same package can share files and their presence in a + * third package of the same set is not a sign that we can get rid of + * it. */ + if (pkgtobesaved->installed.multiarch == multiarch_same && + thirdpkg->set == pkgtobesaved->set) + continue; + /* If !fileslistvalid then we've already disappeared this one, so * we shouldn't try to make it take over this shared directory. */ debug(dbg_eachfiledetail,"filesavespackage ... is 3rd package"); diff --git a/src/processarc.c b/src/processarc.c index f783670..eed8683 100644 --- a/src/processarc.c +++ b/src/processarc.c @@ -1253,6 +1253,12 @@ void process_archive(const char *filename) { otherpkg->status == stat_configfiles || otherpkg->clientdata->istobe == itb_remove || !otherpkg->clientdata->files) continue; + /* Do not try to disappear other packages from the same set + * if they are Multi-Arch: same */ + if (pkg->installed.multiarch == multiarch_same && + otherpkg->installed.multiarch == multiarch_same && + otherpkg->set == pkg->set) + continue; debug(dbg_veryverbose, "process_archive checking disappearance %s", pkg_name(otherpkg, pno_nonambig)); assert(otherpkg->clientdata->istobe == itb_normal ||