You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/01/14 15:39:13 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #973: MINIFICPP-1446 - SQL extension doesn't compile on Debian

szaszm commented on a change in pull request #973:
URL: https://github.com/apache/nifi-minifi-cpp/pull/973#discussion_r557487939



##########
File path: cmake/BundledOSSPUUID.cmake
##########
@@ -21,8 +21,8 @@ function(use_bundled_osspuuid SOURCE_DIR BINARY_DIR)
     message("Using bundled ossp-uuid")
 
     # Define patch step
-    set(PC "${Patch_EXECUTABLE}" -p1 -i "${SOURCE_DIR}/thirdparty/ossp-uuid/ossp-uuid-mac-fix.patch" &&
-           "${Patch_EXECUTABLE}" -p1 -i "${SOURCE_DIR}/thirdparty/ossp-uuid/ossp-uuid-no-prog.patch")
+    set(PC "${Patch_EXECUTABLE}" -p1 -N -r- -i "${SOURCE_DIR}/thirdparty/ossp-uuid/ossp-uuid-mac-fix.patch" &&
+           "${Patch_EXECUTABLE}" -p1 -N -r- -i "${SOURCE_DIR}/thirdparty/ossp-uuid/ossp-uuid-no-prog.patch" || :)

Review comment:
       That was me, I admit it's not a nice solution. The intention was to stop patch from throwing errors when it has already been applied, but the only way was to stop it from throwing errors altogether.
   
   I got an idea that maybe instead of `|| :` at the end, we could try reverse applying with `--dry-run` to not actually change anything. This would verify that either we could apply the patch or it could be reverse applied, i.e. it has already been applied. Would this be a good enough workaround for you or do you want to revert the whole change?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org