1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

Silent rmdir after removing the optionfile, the directory might contains other

informations like distfiles (added by portmaster)

While here only check if the optionsfile is there before removing it.

PR:		ports/164422
Submitted by:	Greg Larkin <glarkin@freebsd.org>
This commit is contained in:
Baptiste Daroussin 2012-06-06 14:23:17 +00:00
parent dcec4eb3f1
commit 2641586787
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298595

View File

@ -6164,7 +6164,7 @@ showconfig-recursive:
.if !target(rmconfig)
rmconfig:
.if defined(OPTIONS) && exists(${OPTIONSFILE})
.if exists(${OPTIONSFILE})
-@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \
optionsdir=${OPTIONSFILE}; optionsdir=$${optionsdir%/*}; \
if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
@ -6174,7 +6174,7 @@ rmconfig:
${ECHO_MSG} "===> Returning to user credentials"; \
else \
${RM} -f ${OPTIONSFILE}; \
${RMDIR} $${optionsdir} || return 0; \
${RMDIR} $${optionsdir} 2>/dev/null || return 0; \
fi
.else
@${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}"