summaryrefslogtreecommitdiff
path: root/lang/python27
diff options
context:
space:
mode:
authormarino <marino@pkgsrc.org>2011-10-29 13:45:49 +0000
committermarino <marino@pkgsrc.org>2011-10-29 13:45:49 +0000
commit1949086f4eedcefb6d1b678433b0ad725575a996 (patch)
treebf9f44ada51f269bc0a21bf784048dc4a326e56b /lang/python27
parent499509fc4d98b970e0d2ce939fc1b833e9bf9b80 (diff)
downloadpkgsrc-1949086f4eedcefb6d1b678433b0ad725575a996.tar.gz
lang/python27: Fix pkg_delete error
Fixes the following error: > pkg_delete python27-2.7.2 pkg_delete: Directory '/usr/pkg/lib/python2.7/test/data' disappeared, skipping
Diffstat (limited to 'lang/python27')
-rw-r--r--lang/python27/DEINSTALL19
-rw-r--r--lang/python27/Makefile3
-rw-r--r--lang/python27/PLIST.common_end3
3 files changed, 20 insertions, 5 deletions
diff --git a/lang/python27/DEINSTALL b/lang/python27/DEINSTALL
new file mode 100644
index 00000000000..e891ff479c4
--- /dev/null
+++ b/lang/python27/DEINSTALL
@@ -0,0 +1,19 @@
+# $NetBSD: DEINSTALL,v 1.1 2011/10/29 13:45:49 marino Exp $
+
+# DEINSTALL is used rather than @pkgdir because the automatic directory
+# deletion mechanism makes python packages remove these directories first,
+# and thus "Directory disappeared" messages will likely appear under @pkgdir
+
+case ${STAGE} in
+POST-DEINSTALL)
+ CYCLE="@PREFIX@/lib/python@PY_VER_SUFFIX@/test/data \
+ @PREFIX@/lib/python@PY_VER_SUFFIX@/lib-old"
+ for genpath in ${CYCLE}; do
+ if [ -d ${genpath} ]; then
+ if [ -n `${LS} -A ${$genpath}` ]; then
+ ${RMDIR} ${genpath}
+ fi
+ fi
+ done
+ ;;
+esac
diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index 8e38513c55f..dbacd285127 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2011/09/16 19:17:52 bsiegert Exp $
+# $NetBSD: Makefile,v 1.8 2011/10/29 13:45:50 marino Exp $
.include "dist.mk"
@@ -52,7 +52,6 @@ PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common
.if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
.endif
-PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end
.if ${OPSYS} == "NetBSD"
PRIVILEGED_STAGES+= clean
diff --git a/lang/python27/PLIST.common_end b/lang/python27/PLIST.common_end
deleted file mode 100644
index a9da003a88f..00000000000
--- a/lang/python27/PLIST.common_end
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST.common_end,v 1.1.1.1 2011/02/22 08:52:01 obache Exp $
-@pkgdir lib/python${PY_VER_SUFFIX}/test/data
-@pkgdir lib/python${PY_VER_SUFFIX}/lib-old