Fix lz4 and libssh uninstall.

We have to remove the lz4 build tree as root.

We can't do "make uninstall" for libssh, so manually remove the stuff it
installs.  Also, remove the -done file, and remove the downloaded
tarball and build tree if we're supposed to do so.

Change-Id: If594ab241a9955229dfbc12e4f5e0c517add6daa
Reviewed-on: https://code.wireshark.org/review/22996
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-08-07 12:13:56 -07:00
parent a0ee5d6e42
commit 2ca4c5d756
1 changed files with 33 additions and 2 deletions

View File

@ -1616,7 +1616,13 @@ uninstall_lz4() {
#
# Get rid of the previously downloaded and unpacked version.
#
rm -rf lz4-$installed_lz4_version
# "make install" apparently causes some stuff to be
# modified in the build tree, so, as it's done as
# root, that leaves stuff owned by root in the build
# tree. Therefore, we have to remove the build tree
# as root.
#
sudo rm -rf lz4-$installed_lz4_version
rm -rf lz4-$installed_lz4_version.tar.gz
fi
@ -1779,7 +1785,32 @@ install_libssh() {
uninstall_libssh() {
if [ ! -z "$installed_libssh_version" ] ; then
echo "Sadly, libssh uses cmake, and doesn't support uninstall."
echo "Uninstalling libssh:"
cd libssh-$installed_libssh_version
#
# libssh uses cmake and doesn't support "make uninstall"
#
# $DO_MAKE_UNINSTALL || exit 1
sudo rm -rf /usr/local/lib/libssh*
sudo rm -rf /usr/local/include/libssh
sudo rm -rf /usr/local/lib/pkgconfig/libssh*
sudo rm -rf /usr/local/lib/cmake/libssh
#
# libssh uses cmake and doesn't support "make distclean"
#
# make distclean || exit 1
cd ..
rm libssh-$installed_libssh_version-done
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
#
# Get rid of the previously downloaded and unpacked version.
#
rm -rf libssh-$installed_libssh_version
rm -rf libssh-$installed_libssh_version.tar.gz
fi
installed_libssh_version=""
fi
}