Matthew Woehlke wrote:
> ABCD wrote:
>> First off, my apologies if I sent this to the wrong list.
>>
>> Currently, KDE/kdelibs/cmake/modules/create_exe_symlink.cmake calls
>> chmod on the previously installed version of a file when DESTDIR is
>> set, which is incorrect. It should be calling chmod on the filename
>> under DESTDIR. This patch (attached) fixes that.
>
> - EXECUTE_PROCESS(COMMAND chmod a+x ${abs_target})
> + EXECUTE_PROCESS(COMMAND chmod a+x $ENV{DESTDIR}/${abs_target})
>
> This looks wrong; I don't think you can safely add the / without
> checking if $ENV{DESTDIR} is empty or not. (Remember that the absolute
> paths /usr and //usr are not required to be the same!)
>
I had forgotten about that (and I actually *have* used systems where
"/" != "//", namely cygwin). The following version of the patch should
fix that, as because ${abs_target} is absolute, it will always begin
with a "/" (or "//"):
EXECUTE_PROCESS(COMMAND chmod a+x $ENV{DESTDIR}${abs_target})
Attached is a modified version of the patch to take that change into
account.
--
ABCD
Index: kdelibs/cmake/modules/create_exe_symlink.cmake
===================================================================
--- kdelibs/cmake/modules/create_exe_symlink.cmake (revision 964573)
+++ kdelibs/cmake/modules/create_exe_symlink.cmake (working copy)
@@ -11,6 +11,6 @@
GET_FILENAME_COMPONENT(abs_target ${TARGET} ABSOLUTE)
IF(UNIX)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${abs_target}
${abs_link_name})
- EXECUTE_PROCESS(COMMAND chmod a+x ${abs_target})
+ EXECUTE_PROCESS(COMMAND chmod a+x $ENV{DESTDIR}${abs_target})
ENDIF(UNIX)
# FIXME: WIN32 support
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
