Skip to content

Commit 975e5c3

Browse files
committed
Fix CMake syntax bug which breaks package pre-removal
Fix bugs introduced in commit 4747733 by #7835 Signed-off-by: Ronan Keryell <[email protected]>
1 parent ad7b6ee commit 975e5c3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/CMake/config/prerm-azure.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# configuration of the components and hence we want to handle the configuration
3131
# in postinst script.
3232

33-
DIR=@@CMAKE_INSTALL_PREFIX@@/xrt
33+
DIR=@CMAKE_INSTALL_PREFIX@/xrt
3434

3535
#In case prerm is called after postinst on centos, make sure not to stop mpd
3636
awk -F= '$1=="ID" {print $2}' /etc/os-release | tr -d '"' | awk '{print tolower($1)}' | grep -Eq "^rhel|^centos"

src/CMake/config/prerm-container.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ $? -eq 0 ] && [ $1 -ge 1 ]; then
3838
fi
3939

4040
echo "Remove mpd plugin"
41-
rm -rf @@CMAKE_INSTALL_PREFIX@@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
41+
rm -rf @CMAKE_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
4242
systemctl disable mpd > /dev/null 2>&1
4343
systemctl stop mpd > /dev/null 2>&1
4444

src/CMake/config/prerm.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ rm -rf /etc/systemd/system/msd.service
5757
rm -rf /etc/systemd/system/mpd.service
5858
systemctl daemon-reload
5959
# Remove config file for MSD as well
60-
@@CMAKE_INSTALL_PREFIX@@/xrt/bin/xbmgmt --legacy config --purge 2>&1 > /dev/null
60+
@CMAKE_INSTALL_PREFIX@/xrt/bin/xbmgmt --legacy config --purge 2>&1 > /dev/null
6161

6262
echo "Unloading old XRT Linux kernel modules"
6363
rmmod xocl
@@ -82,7 +82,7 @@ echo "Cleaning up XMA..."
8282
rm -f /tmp/xma_shm_db
8383

8484
echo "Cleaning up python..."
85-
rm -f @@CMAKE_INSTALL_PREFIX@@/xrt/python/*.pyc
86-
rm -f @@CMAKE_INSTALL_PREFIX@@/xrt/test/*.pyc
85+
rm -f @CMAKE_INSTALL_PREFIX@/xrt/python/*.pyc
86+
rm -f @CMAKE_INSTALL_PREFIX@/xrt/test/*.pyc
8787

8888
exit 0

0 commit comments

Comments
 (0)