瀏覽代碼

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.
   * Do not output the Package-Type field on udeb.
   * Fix versioned Replaces to not produce file overwrite errors on downgrades.
   * Fix versioned Replaces to not produce file overwrite errors on downgrades.
     Closes: #568566
     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 ]
   [ Updated dpkg translations ]
   * German (Sven Joachim).
   * 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"),
 	  printf(_("Replaced by files in installed package %s ...\n"),
 		 otherpkg->name);
 		 otherpkg->name);
           otherpkg->clientdata->replacingfilesandsaid= 2;
           otherpkg->clientdata->replacingfilesandsaid= 2;
+          nifd->namenode->flags &= ~fnnf_new_inarchive;
 	  keepexisting = 1;
 	  keepexisting = 1;
         } else {
         } else {
           if (!statr && S_ISDIR(stab.st_mode)) {
           if (!statr && S_ISDIR(stab.st_mode)) {