Improve CPackRPM debug output

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Improve CPackRPM debug output

Stewart, Robert
I suggest adding the following to CPackRPM.cmake at https://github.com/Kitware/CMake/blob/8f05be992172e6d65bbb23426231fa253d7f15c9/Modules/Internal/CPack/CPackRPM.cmake#L1776 to aid understanding of what CPackRPM.cmake is doing:

    if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
      message("CPackRPM:Debug: running
    \"${RPMBUILD_EXECUTABLE}\" ${RPMBUILD_FLAGS}
        --define \"%_topdir ${CPACK_RPM_DIRECTORY}\"
        --buildroot \"%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}\"
        --target \"${CPACK_RPM_PACKAGE_ARCHITECTURE}\"
        \"${CPACK_RPM_BINARY_SPECFILE}\"
    in \"${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}\"")
    endif()

(It wasn't worth my trouble to fork the project and issue a pull request for this.  Should I file a bug?)

___
Rob


________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Improve CPackRPM debug output

Stewart, Robert
On Thursday, March 07, 2019 8:49 AM, I wrote:

>
> I suggest adding the following to CPackRPM.cmake [snip]:
>
>     if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
>       message("CPackRPM:Debug: running
>     \"${RPMBUILD_EXECUTABLE}\" ${RPMBUILD_FLAGS}
>         --define \"%_topdir ${CPACK_RPM_DIRECTORY}\"
>         --buildroot
> \"%_topdir/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMP
> ONENT_PART_PATH}\"
>         --target \"${CPACK_RPM_PACKAGE_ARCHITECTURE}\"
>         \"${CPACK_RPM_BINARY_SPECFILE}\"
>     in
> \"${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPA
> CK_RPM_PACKAGE_COMPONENT_PART_PATH}\"")
>     endif()

I failed to note that the leading whitespace is significant in the message() call.  It produces more readable output, though it doesn't eliminate all line wrapping.

___
Rob

________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake