Browse Source

Error out when trying to replace a conffile w/o a Replaces field

Do not allow installing packages with non-obsolete conffiles owned by
other packages without a proper Replaces field. Closes: #508392

Regression introduced in commit 854ad168370000ca46f4ba091c2d5bb05274b6ef,
present since dpkg 1.13.14.
Guillem Jover 17 years ago
parent
commit
4021e3db0f
3 changed files with 12 additions and 1 deletions
  1. 6 0
      ChangeLog
  2. 4 0
      debian/changelog
  3. 2 1
      src/archives.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-12-20  Guillem Jover  <guillem@debian.org>
+
+	* src/archives.c (tarobject): Move a 'continue' inside a conditional
+	checking if the conffile to take over was obsolete on the other
+	package by adding missing bracese.
+
 2008-12-01  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Source/Archive.pm (extract): Do not create the temp

+ 4 - 0
debian/changelog

@@ -11,6 +11,10 @@ dpkg (1.14.24) UNRELEASED; urgency=low
     from a non-writable directory when a target directory has been specified
     on the command line. Closes: #507217, #507219
 
+  [ Guillem Jover ]
+  * Do not allow installing packages with non-obsolete conffiles owned by
+    other packages without a proper Replaces field. Closes: #508392
+
   [ Updated dpkg translations ]
   * Galician (Marcellini Villarino). Closes: #509150
 

+ 2 - 1
src/archives.c

@@ -542,10 +542,11 @@ int tarobject(struct TarInfo *ti) {
 		stabtmp.st_ino == stab.st_ino)
 	      break;
 	  }
-	  if (conff)
+	  if (conff) {
 	    debug(dbg_eachfiledetail,"tarobject other's obsolete conffile");
 	    /* processarc.c will have copied its hash already. */
 	    continue;
+	  }
 	}
 
         if (does_replace(tc->pkg,&tc->pkg->available,otherpkg)) {