diff --git a/var/spack/repos/spack_repo/builtin/packages/hpx/git_external.patch b/var/spack/repos/spack_repo/builtin/packages/hpx/git_external.patch deleted file mode 100644 index 72d203e7fa1..00000000000 --- a/var/spack/repos/spack_repo/builtin/packages/hpx/git_external.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- hpx/cmake/GitExternal.cmake.orig 2019-08-16 17:27:04.856315000 +0200 -+++ hpx/cmake/GitExternal.cmake 2019-08-16 17:27:47.362709000 +0200 -@@ -19,12 +19,12 @@ - # - # [optional] Flags which control behaviour - # NO_UPDATE --# When set, GitExternal will not change a repo that has already been checked out. --# The purpose of this is to allow one to set a default branch to be checked out, --# but stop GitExternal from changing back to that branch if the user has checked -+# When set, GitExternal will not change a repo that has already been checked out. -+# The purpose of this is to allow one to set a default branch to be checked out, -+# but stop GitExternal from changing back to that branch if the user has checked - # out and is working on another. --# VERBOSE --# When set, displays information about git commands that are executed -+# VERBOSE -+# When set, displays information about git commands that are executed - # - - find_package(Git) -@@ -55,17 +55,21 @@ - if(nok) - message(FATAL_ERROR "${DIR} git clone failed: ${error}\n") - endif() -- endif() - -- if(IS_DIRECTORY "${DIR}/.git") -+ # checkout requested tag -+ GIT_EXTERNAL_MESSAGE("git checkout -q ${TAG}") -+ execute_process( -+ COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}" -+ RESULT_VARIABLE nok ERROR_VARIABLE error -+ WORKING_DIRECTORY "${DIR}" -+ ) -+ if(nok) -+ message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n") -+ endif() -+ elseif(IS_DIRECTORY "${DIR}/.git") - if (${GIT_EXTERNAL_NO_UPDATE}) - GIT_EXTERNAL_MESSAGE("Update branch disabled by user") - else() -- GIT_EXTERNAL_MESSAGE("current ref is \"${currentref}\" and tag is \"${TAG}\"") -- if(currentref STREQUAL TAG) # nothing to do -- return() -- endif() -- - # reset generated files - foreach(GIT_EXTERNAL_RESET_FILE ${GIT_EXTERNAL_RESET}) - GIT_EXTERNAL_MESSAGE("git reset -q ${GIT_EXTERNAL_RESET_FILE}") -@@ -100,15 +104,24 @@ - message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n") - endif() - -- # update tag -- GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD") -- execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD -- RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT -+ # check if this is a branch -+ GIT_EXTERNAL_MESSAGE("git symbolic-ref -q HEAD") -+ execute_process(COMMAND "${GIT_EXECUTABLE}" symbolic-ref -q HEAD -+ RESULT_VARIABLE nok ERROR_VARIABLE error - WORKING_DIRECTORY "${DIR}") -- if(RESULT) -- message(STATUS "git rebase failed, aborting ${DIR} merge") -- execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort -+ if(nok) -+ message(STATUS "${TAG} is not a branch") -+ else() -+ # update tag -+ GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD") -+ execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD -+ RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT - WORKING_DIRECTORY "${DIR}") -+ if(RESULT) -+ message(STATUS "git rebase failed, aborting ${DIR} merge") -+ execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort -+ WORKING_DIRECTORY "${DIR}") -+ endif() - endif() - endif() - else()