Преглед изворни кода

Fix installation of disappearing replaced packages in reverse order

This happens when the we install first the replacing then the replaced
package, for which the replaced package is supposed to get disappeared.
And fixes it to disappear the correct package and not lose track of the
ownership of the replaced files, by marking the replaced file as not
being part of the unpacked archive.
Guillem Jover пре 16 година
родитељ
комит
0958a9f9b2
2 измењених фајлова са 5 додато и 0 уклоњено
  1. 4 0
      debian/changelog
  2. 1 0
      src/archives.c

+ 4 - 0
debian/changelog

@@ -61,6 +61,10 @@ dpkg (1.15.6.2) UNRELEASED; urgency=low
   * Do not output the Package-Type field on udeb.
   * Fix versioned Replaces to not produce file overwrite errors on downgrades.
     Closes: #568566
+  * Fix installation of replaced and replacing packages in reverse order
+    (first the replacing then the replaced) for which the replaced package
+    is supposed to get disappeared, to disappear the correct package and not
+    lose track of the ownership of the replaced files.
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 1 - 0
src/archives.c

@@ -582,6 +582,7 @@ int tarobject(struct TarInfo *ti) {
 	  printf(_("Replaced by files in installed package %s ...\n"),
 		 otherpkg->name);
           otherpkg->clientdata->replacingfilesandsaid= 2;
+          nifd->namenode->flags &= ~fnnf_new_inarchive;
 	  keepexisting = 1;
         } else {
           if (!statr && S_ISDIR(stab.st_mode)) {