Skip to content

Commit

Permalink
Fix CMake syntax bug which breaks package pre-removal
Browse files Browse the repository at this point in the history
Fix bugs introduced in commit 4747733
by #7835

Signed-off-by: Ronan Keryell <[email protected]>
  • Loading branch information
keryell committed Apr 23, 2024
1 parent 46fa626 commit ac1f148
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/CMake/config/prerm-azure.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# configuration of the components and hence we want to handle the configuration
# in postinst script.

DIR=@@CMAKE_INSTALL_PREFIX@@/xrt
DIR=@CMAKE_INSTALL_PREFIX@/xrt

#In case prerm is called after postinst on centos, make sure not to stop mpd
awk -F= '$1=="ID" {print $2}' /etc/os-release | tr -d '"' | awk '{print tolower($1)}' | grep -Eq "^rhel|^centos"
Expand Down
2 changes: 1 addition & 1 deletion src/CMake/config/prerm-container.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ $? -eq 0 ] && [ $1 -ge 1 ]; then
fi

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

Expand Down
6 changes: 3 additions & 3 deletions src/CMake/config/prerm.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ rm -rf /etc/systemd/system/msd.service
rm -rf /etc/systemd/system/mpd.service
systemctl daemon-reload
# Remove config file for MSD as well
@@CMAKE_INSTALL_PREFIX@@/xrt/bin/xbmgmt --legacy config --purge 2>&1 > /dev/null
@CMAKE_INSTALL_PREFIX@/xrt/bin/xbmgmt --legacy config --purge 2>&1 > /dev/null

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

echo "Cleaning up python..."
rm -f @@CMAKE_INSTALL_PREFIX@@/xrt/python/*.pyc
rm -f @@CMAKE_INSTALL_PREFIX@@/xrt/test/*.pyc
rm -f @CMAKE_INSTALL_PREFIX@/xrt/python/*.pyc
rm -f @CMAKE_INSTALL_PREFIX@/xrt/test/*.pyc

exit 0

0 comments on commit ac1f148

Please sign in to comment.