From: Kefu Chai Date: Sun, 20 Dec 2020 05:16:17 +0000 (+0800) Subject: cmake: install python scripts into /usr/sbin even if DESTDIR is empty X-Git-Tag: v16.1.0~173^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38665%2Fhead;p=ceph.git cmake: install python scripts into /usr/sbin even if DESTDIR is empty it's reported that on Alphine, "make install" installs `ceph-volume-systemd` into `/usr/bin` instead of `/usr/sbin`, and this breaks `systemd/ceph-volume@.service`. so in this change, we always install this script into `/usr/sbin`, even if `DESTDIR` is not defined. Signed-off-by: Kefu Chai --- diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake index 8092e58379c5..ff01aaf818a7 100644 --- a/cmake/modules/Distutils.cmake +++ b/cmake/modules/Distutils.cmake @@ -25,9 +25,9 @@ function(distutils_install_module name) list(APPEND options --root=\$ENV{DESTDIR} --single-version-externally-managed) - if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") - list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) - endif() + endif() + if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\") + list(APPEND options --install-script=${DU_INSTALL_SCRIPT}) endif() execute_process( COMMAND ${Python3_EXECUTABLE}