kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject incubator-kudu git commit: client: fix export target munging on Linux
Date Fri, 22 Jan 2016 21:04:29 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master dda74081f -> e503538af

client: fix export target munging on Linux

Despite being good intentioned, commit fa6e943 fixed target munging on OS X
at the expense of regressing it on Linux. Specifically, "sed -i ''" yields
backup files with double single-quote suffixes in their names.

After extensive trial and error, the only in-place invocation of sed that'd
work for both platforms required duplicating the call to execute_process().
That's ugly, so here's an approach that foregoes in-place replacement.

Dan and I tested this on Linux and OS X. In both cases:
1. No backup cmake files were created, and
2. The actual replacement took place.

Change-Id: I3451258ff29670367a357111c43e3c27c6392622
Reviewed-on: http://gerrit.cloudera.org:8080/1866
Tested-by: Internal Jenkins
Reviewed-by: Dan Burkert <dan@cloudera.com>

Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/e503538a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/e503538a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/e503538a

Branch: refs/heads/master
Commit: e503538af271ba078fa357a516f549a4d91a24f7
Parents: dda7408
Author: Adar Dembo <adar@cloudera.com>
Authored: Thu Jan 21 15:49:19 2016 -0800
Committer: Adar Dembo <adar@cloudera.com>
Committed: Fri Jan 22 20:56:01 2016 +0000

 src/kudu/client/MungeExportedInstallTargets.cmake | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/kudu/client/MungeExportedInstallTargets.cmake b/src/kudu/client/MungeExportedInstallTargets.cmake
index 3b2ee6a..b5e4060 100644
--- a/src/kudu/client/MungeExportedInstallTargets.cmake
+++ b/src/kudu/client/MungeExportedInstallTargets.cmake
@@ -25,5 +25,7 @@ endif()
   message(STATUS "Munging kudu client targets in ${CMAKE_FILE}")
-  execute_process(COMMAND sed -i'' s/kudu_client_exported/kudu_client/g ${CMAKE_FILE})
+  execute_process(COMMAND sed s/kudu_client_exported/kudu_client/g ${CMAKE_FILE}
+  execute_process(COMMAND mv -f ${CMAKE_FILE}.new ${CMAKE_FILE})

View raw message