You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2018/06/29 13:45:51 UTC

mesos git commit: Removed incorrect symlink handling in archiver utility.

Repository: mesos
Updated Branches:
  refs/heads/master 90c5c0b41 -> 22471b83a


Removed incorrect symlink handling in archiver utility.

While fixing MESOS-9008, we accidentally assumed that all links needed
to be corrected when extracting to a different directory.  This is
necessary for hardlinks because a hardlink must point to a file
extracted earlier in the archive.  However, for symlinks, this is not
the case.  When extracted with no header modifications, symlinks will
point to their intended target (i.e. relative symlinks will not be
transformed into targetting absolute paths).

Review: https://reviews.apache.org/r/67780/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/22471b83
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/22471b83
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/22471b83

Branch: refs/heads/master
Commit: 22471b83a418e614b19a7ae50b73ee028dc7c363
Parents: 90c5c0b
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Fri Jun 29 09:44:51 2018 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Fri Jun 29 09:44:51 2018 -0400

----------------------------------------------------------------------
 3rdparty/stout/include/stout/archiver.hpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/22471b83/3rdparty/stout/include/stout/archiver.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/archiver.hpp b/3rdparty/stout/include/stout/archiver.hpp
index 0f24929..2447797 100644
--- a/3rdparty/stout/include/stout/archiver.hpp
+++ b/3rdparty/stout/include/stout/archiver.hpp
@@ -116,18 +116,13 @@ inline Try<Nothing> extract(
     // If a destination path is specified, update the entry to reflect it.
     // We assume the destination directory already exists.
     if (!destination.empty()) {
-      // NOTE: These will be nullptr if the entry is not a hardlink/symlink.
+      // NOTE: This will be nullptr if the entry is not a hardlink.
       const char* hardlink_target = archive_entry_hardlink_utf8(entry);
-      const char* symlink_target = archive_entry_symlink_utf8(entry);
 
       if (hardlink_target != nullptr) {
         archive_entry_update_hardlink_utf8(
             entry,
             path::join(destination, hardlink_target).c_str());
-      } else if (symlink_target != nullptr) {
-        archive_entry_update_symlink_utf8(
-            entry,
-            path::join(destination, symlink_target).c_str());
       }
 
       archive_entry_update_pathname_utf8(