[Cmake-commits] CMake branch, next, updated. v2.8.12-4760-g63256e5

Brad King brad.king at kitware.com
Fri Nov 1 16:53:53 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  63256e5e9aefd51d564bee417d355e7bad4f20d7 (commit)
       via  4c383b52d0611c56679f96cbc99fc1d6683b5ca9 (commit)
       via  0d8552c4597793262f4201dee98c73907c31d5bc (commit)
      from  d4119539cc87f52421f862937dcaf02699b6c052 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63256e5e9aefd51d564bee417d355e7bad4f20d7
commit 63256e5e9aefd51d564bee417d355e7bad4f20d7
Merge: d411953 4c383b5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 1 16:53:51 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 1 16:53:51 2013 -0400

    Merge topic 'archive-skip-symlink-on-windows' into next
    
    4c383b5 cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
    0d8552c cmSystemTools: Re-order extract_tar logic


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c383b52d0611c56679f96cbc99fc1d6683b5ca9
commit 4c383b52d0611c56679f96cbc99fc1d6683b5ca9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 1 16:52:22 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 1 16:52:22 2013 -0400

    cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
    
    If a symlink fails to extract and the host system is Windows then report
    a warning and skip the entry instead of failing.  This will allow
    archives containing symbolic links to be extracted on Windows with
    somewhat gracefully degraded behavior.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 34a1216..1ecda88 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1660,6 +1660,14 @@ bool extract_tar(const char* outFileName, bool verbose,
           break;
           }
         }
+#ifdef _WIN32
+      else if(const char* linktext = archive_entry_symlink(entry))
+        {
+        std::cerr << "cmake -E tar: warning: skipping symbolic link \""
+                  << archive_entry_pathname(entry) << "\" -> \""
+                  << linktext << "\"." << std::endl;
+        }
+#endif
       else
         {
         cmSystemTools::Error("Problem with archive_write_header(): ",

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0d8552c4597793262f4201dee98c73907c31d5bc
commit 0d8552c4597793262f4201dee98c73907c31d5bc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 1 16:52:18 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 1 16:52:18 2013 -0400

    cmSystemTools: Re-order extract_tar logic
    
    Simplify extraction message logic to be easier to follow and to write a
    newline before any error messages that may be produced.  Also flip
    handling of the archive_write_header return code to handle success in
    the "then" case and failure in the "else" case.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 8320ecf..34a1216 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1619,18 +1619,23 @@ bool extract_tar(const char* outFileName, bool verbose,
                            archive_error_string(a));
       break;
       }
-    if (verbose && extract)
+    if(verbose)
       {
-      cmSystemTools::Stdout("x ");
-      cmSystemTools::Stdout(archive_entry_pathname(entry));
-      }
-    if(verbose && !extract)
-      {
-      list_item_verbose(stdout, entry);
+      if(extract)
+        {
+        cmSystemTools::Stdout("x ");
+        cmSystemTools::Stdout(archive_entry_pathname(entry));
+        }
+      else
+        {
+        list_item_verbose(stdout, entry);
+        }
+      cmSystemTools::Stdout("\n");
       }
     else if(!extract)
       {
       cmSystemTools::Stdout(archive_entry_pathname(entry));
+      cmSystemTools::Stdout("\n");
       }
     if(extract)
       {
@@ -1644,15 +1649,7 @@ bool extract_tar(const char* outFileName, bool verbose,
         }
 
       r = archive_write_header(ext, entry);
-      if (r != ARCHIVE_OK)
-        {
-        cmSystemTools::Error("Problem with archive_write_header(): ",
-                             archive_error_string(ext));
-        cmSystemTools::Error("Current file: ",
-                             archive_entry_pathname(entry));
-        break;
-        }
-      else
+      if (r == ARCHIVE_OK)
         {
         copy_data(a, ext);
         r = archive_write_finish_entry(ext);
@@ -1663,10 +1660,14 @@ bool extract_tar(const char* outFileName, bool verbose,
           break;
           }
         }
-      }
-    if (verbose || !extract)
-      {
-      cmSystemTools::Stdout("\n");
+      else
+        {
+        cmSystemTools::Error("Problem with archive_write_header(): ",
+                             archive_error_string(ext));
+        cmSystemTools::Error("Current file: ",
+                             archive_entry_pathname(entry));
+        break;
+        }
       }
     }
   archive_read_close(a);

-----------------------------------------------------------------------

Summary of changes:
 Source/cmSystemTools.cxx |   49 +++++++++++++++++++++++++++------------------
 1 files changed, 29 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list