mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Clean up the /var/db/portindex directory (if it is empty) on
deinstallation. Submitted by: swills (via jenkins.freebsd.org)
This commit is contained in:
parent
213ca65426
commit
c1617bf425
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=353039
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= FreeBSD-Portindex
|
||||
PORTVERSION= 3.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= ports-mgmt perl5
|
||||
MASTER_SITES= http://www.infracaninophile.co.uk/portindex/
|
||||
PKGNAMEPREFIX= p5-
|
||||
@ -37,13 +38,13 @@ CACHE_MODE?= 0775
|
||||
|
||||
CFG_FILE= portindex.cfg
|
||||
|
||||
SUB_FILES+= pkg-install
|
||||
SUB_FILES+= pkg-install pkg-deinstall
|
||||
SUB_LIST+= CACHE_DIR=${CACHE_DIR} \
|
||||
CACHE_OWNER=${CACHE_OWNER} \
|
||||
CACHE_GROUP=${CACHE_GROUP} \
|
||||
CACHE_MODE=${CACHE_MODE}
|
||||
|
||||
post-install: install-conf
|
||||
post-install: install-conf
|
||||
|
||||
install-conf:
|
||||
cd ${WRKSRC} ; \
|
||||
|
23
ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in
Normal file
23
ports-mgmt/p5-FreeBSD-Portindex/files/pkg-deinstall.in
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
|
||||
|
||||
CACHE_DIR=%%CACHE_DIR%%
|
||||
|
||||
case $2 in
|
||||
|
||||
# Remove the cache directory, but only if it is empty.
|
||||
|
||||
POST-DEINSTALL)
|
||||
if [ ! -d ${CACHE_DIR} ] ; then
|
||||
rmdir ${CACHE_DIR} >/dev/null 2>&1 || true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# That's All Folks!
|
||||
#
|
Loading…
Reference in New Issue
Block a user