Procházet zdrojové kódy

dpkg: Do not fail when unpacking a diverted hardlink

Closes: #245322

Based-on-patch-by: Christopher Baines <cbaines8@gmail.com>
Guillem Jover před 15 roky
rodič
revize
e897fdba4e
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 2 0
      debian/changelog
  2. 1 1
      src/archives.c

+ 2 - 0
debian/changelog

@@ -32,6 +32,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Support conffiles with spaces when diffing them. Closes: #147583
   * Allow installing packages with bogus versions with new
     --force-bad-version.
+  * Do not fail when unpacking a diverted hardlink. Closes: #245322
+    Based on a patch by Christopher Baines <cbaines8@gmail.com>.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).

+ 1 - 1
src/archives.c

@@ -753,8 +753,8 @@ tarobject(void *ctx, struct tar_entry *ti)
     varbuf_reset(&hardlinkfn);
     varbuf_add_str(&hardlinkfn, instdir);
     varbuf_add_char(&hardlinkfn, '/');
-    varbuf_add_str(&hardlinkfn, ti->linkname);
     linknode = findnamenode(ti->linkname, 0);
+    varbuf_add_str(&hardlinkfn, namenodetouse(linknode, tc->pkg)->name);
     if (linknode->flags & fnnf_deferred_rename)
       varbuf_add_str(&hardlinkfn, DPKGNEWEXT);
     varbuf_end_str(&hardlinkfn);