From 44c9dc3f649259729cb64439670f3d2d51a0d7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Thu, 4 Jul 2024 08:43:58 +0300 Subject: [PATCH] vendor: Don't use absolute dir for mkbootimg symlink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I noticed that the absolute symlink did not work on my system when trying to execute the script inside it's installation directory before the package is installed. While investigating I noticed that on SUSE the symlink gets relinked to be relative to be relative to the install location of the symlink after which the link works. Using a relative link seems safer to me. Signed-off-by: Björn Bidar --- vendor/CMakeLists.mkbootimg.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/CMakeLists.mkbootimg.txt b/vendor/CMakeLists.mkbootimg.txt index 7f8dfa8..b82e93c 100644 --- a/vendor/CMakeLists.mkbootimg.txt +++ b/vendor/CMakeLists.mkbootimg.txt @@ -1,7 +1,7 @@ -set(MKBOOTIMG_SCRIPTS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/android-tools/mkbootimg) +set(MKBOOTIMG_SCRIPTS_DIR ${CMAKE_INSTALL_DATADIR}/android-tools/mkbootimg) install(PROGRAMS mkbootimg/mkbootimg.py DESTINATION ${MKBOOTIMG_SCRIPTS_DIR}) add_custom_target(mkbootimg_symlink ALL COMMAND ${CMAKE_COMMAND} -E create_symlink - ${MKBOOTIMG_SCRIPTS_DIR}/mkbootimg.py + ../${MKBOOTIMG_SCRIPTS_DIR}/mkbootimg.py ${CMAKE_CURRENT_BINARY_DIR}/mkbootimg) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mkbootimg DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES mkbootimg/gki/generate_gki_certificate.py DESTINATION ${MKBOOTIMG_SCRIPTS_DIR}/gki)