sys-devel/distcc: Clean up old masq path on migration
authorMichał Górny <mgorny@gentoo.org>
Sun, 2 Dec 2018 08:27:15 +0000 (09:27 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 2 Dec 2018 08:38:16 +0000 (09:38 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sys-devel/distcc/distcc-3.3.ebuild

index f7c6c521c1ba95aefcade9d8590f01b46227bb56..a0caa0c8467cec83a15fddf94d34dd3d2ff29921 100644 (file)
@@ -148,6 +148,12 @@ src_install() {
 }
 
 pkg_postinst() {
+       # remove the old paths when switching from libXX to lib
+       if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \
+                       -d ${EROOT%/}/usr/$(get_libdir)/distcc ]]; then
+               rm -r -f "${EROOT%/}/usr/$(get_libdir)/distcc" || die
+       fi
+
        if [[ ${ROOT} == / ]]; then
                eselect compiler-shadow update distcc
                eselect compiler-shadow update distccd