Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2002 21:05:07 +0200
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Speeding up bsd.ports.mk
Message-ID:  <3C7544E3.2CC013B4@FreeBSD.org>
References:  <3C73F34F.D9A58E8B@FreeBSD.org> <a51k3b$31a$1@kemoauc.mips.inka.de> <3C74B745.9D57D6A9@FreeBSD.org> <3C74BF4E.480E1D39@FreeBSD.org> <3C75260E.1F72E9F6@FreeBSD.org> <p05101410b89ae610a56c@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------208F773B37C5BCC71EFB9663
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Garance A Drosihn wrote:
> 
> At 6:53 PM +0200 2/21/02, Maxim Sobolev wrote:
> >Ok, attached please find a patch to speed-up bsd.ports.mk. There are
> >also attached test port and a script to roughly measure performance of
> >the bsd.port.mk using this port. Following are the number from my
> >P266MMX notebook running -current:
> 
> I tried the patch on -stable.  Would that be expected to work?
> 
> I did a cvsup of ports, applied the patch, and did a:
>        portupgrade -rR portupgrade
> 
> and it failed:
> 
> --->  Upgrading 'portupgrade-20020204' to
>        'portupgrade-20020220.1_2' (sysutils/portupgrade)
> --->  Building '/usr/ports/sysutils/portupgrade'
> ===>  Cleaning for portupgrade-20020220.1_2
> ===>  Extracting for portupgrade-20020220.1_2
> >>  Checksum OK for pkgtools-20020204.tar.bz2.
> >>  Checksum OK for pkgtools-20020204-20020218.diff.bz2.
> cannot open pkgtools-20020218-20020220.diff.bz2: no such file
> *** Error code 2
> 
> Stop in /usr/ports/sysutils/portupgrade.
> ** Command failed: make clean build
> ** Fix the problem and try again.
> ** The following packages were not installed or upgraded (*:skipped / !:failed)
>          ! sysutils/portupgrade (portupgrade-20020204)   (unknown build error)
> 
> I then redid the cvsup (which just replaced the bsd.ports.mk), and
> the upgrade of portupgrade worked OK.  It did both the portupgrade
> port, and the databases/ruby-bdb1 port.
> 
> I have not looked into this at all, as I am not sure if this was
> supposed to work on a 4.5-stable system...

OOPS, sorry, as usually last-time cleanup broke things. Attached
please find patch that should actually work for fetch target. Please
test and let me know if it works for you or not.

Thank you for giving it a try - your help is really appreciated!

-Maxim
--------------208F773B37C5BCC71EFB9663
Content-Type: text/plain; charset=koi8-r;
 name="bsd.port.mk-speedup.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bsd.port.mk-speedup.diff"

--- bsd.port.mk.orig	Thu Jan 24 09:36:26 2002
+++ bsd.port.mk	Thu Feb 21 21:00:16 2002
@@ -2252,7 +2252,6 @@
 
 .if !target(do-package)
 do-package: ${TMPPLIST}
-	@${ECHO_MSG} "===>  Building package for ${PKGNAME}"
 	@if [ -d ${PACKAGES} ]; then \
 		if [ ! -d ${PKGREPOSITORY} ]; then \
 			if ! ${MKDIR} ${PKGREPOSITORY}; then \
@@ -2275,8 +2274,7 @@
 # Some support rules for do-package
 
 .if !target(package-links)
-package-links:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} delete-package-links
+package-links: delete-package-links
 	@for cat in ${CATEGORIES}; do \
 		if [ ! -d ${PACKAGES}/$$cat ]; then \
 			if ! ${MKDIR} ${PACKAGES}/$$cat; then \
@@ -2308,8 +2306,7 @@
 .endif
 
 .if !target(delete-package)
-delete-package:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} delete-package-links
+delete-package: delete-package-links
 	@${RM} -f ${PKGFILE}
 .endif
 
@@ -2324,29 +2321,12 @@
 .endif
 
 .if !target(delete-package-list)
-delete-package-list:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} delete-package-links-list
+delete-package-list: delete-package-links-list
 	@${ECHO} "[ -f ${PKGFILE} ] && (${ECHO} deleting ${PKGFILE}; ${RM} -f ${PKGFILE})"
 .endif
 
-################################################################
-# This is the "generic" port target, actually a macro used from the
-# six main targets.  See below for more.
-################################################################
-
-_PORT_USE: .USE
-.if make(real-fetch)
-.if defined(TRYBROKEN)
-	@${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN."
-.endif
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch-depends
-.endif
-.if make(real-extract)
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} checksum REAL_EXTRACT=yes
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} build-depends lib-depends misc-depends
-.endif
-.if make(real-install)
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} check-categories
+.if !target(check-already-installed)
+check-already-installed:
 .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
 	@if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \
 		${ECHO} "===>  ${PKGNAME} is already installed - perhaps an older version?"; \
@@ -2357,15 +2337,22 @@
 		${ECHO} "      in your environment or the \"make install\" command line."; \
 		exit 1; \
 	fi
+.else
+	@${DO_NADA}
+.endif
 .endif
+
+.if !target(check-umask)
+check-umask:
 	@if [ `${SH} -c umask` != 0022 ]; then \
 		${ECHO_MSG} "===>  Warning: your umask is \"`${SH} -c umask`"\".; \
 		${ECHO_MSG} "      If this is not desired, set it to an appropriate value"; \
 		${ECHO_MSG} "      and install this port again by \`\`make reinstall''."; \
 	fi
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} run-depends lib-depends
 .endif
-.if make(real-install)
+
+.if !target(install-mtree)
+install-mtree:
 	@${MKDIR} ${PREFIX}
 	@if [ `id -u` != 0 ]; then \
 		if [ -w ${PREFIX}/ ]; then \
@@ -2390,38 +2377,49 @@
 	fi
 .endif
 .endif
-.if make(real-configure) && defined(USE_LIBTOOL)
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} patch-libtool
-.endif
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} ${.TARGET:S/^real-/pre-/}
-	@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/} ]; then \
-		cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
-			${SCRIPTDIR}/${.TARGET:S/^real-/pre-/}; \
-	fi
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} ${.TARGET:S/^real-/do-/}
-# put here so ports can change the contents of ${TMPPLIST} if necessary
-.if make(real-install)
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} generate-plist
-.endif
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} ${.TARGET:S/^real-/post-/}
-	@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/post-/} ]; then \
-		cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
-			${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \
-	fi
-.if make(real-install) && (defined(_MANPAGES) || defined(_MLINKS))
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} compress-man
-.endif
-.if make(real-install) && defined(INSTALLS_SHLIB)
+
+.if !target(run-ldconfig)
+run-ldconfig:
+.if defined(INSTALLS_SHLIB)
 	@${ECHO_MSG} "===>   Running ldconfig"
 	${LDCONFIG} -m ${LDCONFIG_RUNLIST}
+.else
+	@${DO_NADA}
 .endif
-.if make(real-install) && !defined(NO_PKG_REGISTER)
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fake-pkg
 .endif
-.if !make(real-fetch) \
-	&& (!make(real-patch) || !defined(PATCH_CHECK_ONLY)) \
-	&& (!make(real-package) || !defined(PACKAGE_NOINSTALL))
-	@${TOUCH} ${TOUCH_FLAGS} ${WRKDIR}/.${.TARGET:S/^real-//}_done.${PKGNAME}
+
+.if !target(security-check)
+security-check:
+# Scan PLIST for setugid files and startup scripts
+	-@for i in `${GREP} -v '^@' ${TMPPLIST}`; do \
+		${FIND} ${PREFIX}/$$i -prune -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) -ls 2>/dev/null; \
+	done > ${WRKDIR}/.PLIST.setuid; \
+	${GREP} '^etc/rc.d/' ${TMPPLIST} > ${WRKDIR}/.PLIST.startup; \
+	if [ -s ${WRKDIR}/.PLIST.setuid -o -s ${WRKDIR}/.PLIST.startup ]; then \
+		echo "===>  SECURITY NOTE: "; \
+		if [ -s ${WRKDIR}/.PLIST.setuid ] ; then \
+			echo "      This port has installed the following binaries which execute with"; \
+			echo "      increased privileges."; \
+			${CAT} ${WRKDIR}/.PLIST.setuid; \
+			echo; \
+		fi; \
+		if [ -s ${WRKDIR}/.PLIST.startup ] ; then \
+			echo "      This port has installed the following startup scripts which may cause"; \
+			echo "      network services to be started at boot time."; \
+			${SED} s,^,${PREFIX}/, < ${WRKDIR}/.PLIST.startup; \
+			echo; \
+		fi; \
+		echo "      If there are vulnerabilities in these programs there may be a security"; \
+		echo "      risk to the system. FreeBSD makes no guarantee about the security of"; \
+		echo "      ports included in the Ports Collection. Please type 'make deinstall'"; \
+		echo "      to deinstall the port if this is a concern."; \
+	    if [ ! -z "`make www-site`" ]; then \
+			echo; \
+			echo "      For more information, and contact details about the security"; \
+			echo "      status of this software, see the following webpage: "; \
+			${MAKE} www-site; \
+		fi; \
+	fi
 .endif
 
 ################################################################
@@ -2435,12 +2433,38 @@
 
 .if !target(pre-everything)
 pre-everything:
+.if defined(TRYBROKEN)
+	@${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN."
+.else
 	@${DO_NADA}
 .endif
+.endif
+
+# Please note that the order of the following targets is important, and
+# should not be modified (.ORDER is not recognised by make(1) in a serial
+# make i.e. without -j n)
+_FETCH_SEQ=	pre-everything fetch-depends pre-fetch pre-fetch-script \
+		do-fetch post-fetch post-fetch-script
+_EXTRACT_SEQ=	fetch extract-message checksum build-depends lib-depends \
+		misc-depends pre-extract pre-extract-script do-extract \
+		post-extract post-extract-script
+_PATCH_SEQ=	extract patch-message pre-patch pre-patch-script do-patch \
+		post-patch post-patch-script
+_CONFIGURE_SEQ=	patch configure-message patch-libtool pre-configure \
+		pre-configure-script do-configure post-configure \
+		post-configure-script
+_BUILD_SEQ=	configure build-message pre-build pre-build-script do-build \
+		post-build post-build-script
+_INSTALL_SEQ=	build install-message check-categories check-already-installed \
+		check-umask run-depends lib-depends install-mtree pre-install \
+		pre-install-script do-install generate-plist post-install \
+		post-install-script compress-man run-ldconfig fake-pkg \
+		security-check
+_PACKAGE_SEQ=	install package-message pre-package pre-package-script \
+		do-package post-package-script
 
 .if !target(fetch)
-fetch:	pre-everything
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-fetch
+fetch: ${_FETCH_SEQ}
 .endif
 
 .if !target(extract)
@@ -2467,87 +2491,79 @@
 package: ${PACKAGE_COOKIE}
 .endif
 
-${EXTRACT_COOKIE}:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-extract
-${PATCH_COOKIE}:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} extract
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-patch
-${CONFIGURE_COOKIE}:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} patch
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-configure
-${BUILD_COOKIE}:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} configure
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-build
-${INSTALL_COOKIE}:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} build
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-install
-# Scan PLIST for setugid files and startup scripts
-	-@for i in `${GREP} -v '^@' ${TMPPLIST}`; do \
-		${FIND} ${PREFIX}/$$i -prune -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) -ls 2>/dev/null; \
-	done > ${WRKDIR}/.PLIST.setuid; \
-	${GREP} '^etc/rc.d/' ${TMPPLIST} > ${WRKDIR}/.PLIST.startup; \
-	if [ -s ${WRKDIR}/.PLIST.setuid -o -s ${WRKDIR}/.PLIST.startup ]; then \
-		echo "===>  SECURITY NOTE: "; \
-		if [ -s ${WRKDIR}/.PLIST.setuid ] ; then \
-			echo "      This port has installed the following binaries which execute with"; \
-			echo "      increased privileges."; \
-			${CAT} ${WRKDIR}/.PLIST.setuid; \
-			echo; \
-		fi; \
-		if [ -s ${WRKDIR}/.PLIST.startup ] ; then \
-			echo "      This port has installed the following startup scripts which may cause"; \
-			echo "      network services to be started at boot time."; \
-			${SED} s,^,${PREFIX}/, < ${WRKDIR}/.PLIST.startup; \
-			echo; \
-		fi; \
-		echo "      If there are vulnerabilities in these programs there may be a security"; \
-		echo "      risk to the system. FreeBSD makes no guarantee about the security of"; \
-		echo "      ports included in the Ports Collection. Please type 'make deinstall'"; \
-		echo "      to deinstall the port if this is a concern."; \
-	    if [ ! -z "`make www-site`" ]; then \
-			echo; \
-			echo "      For more information, and contact details about the security"; \
-			echo "      status of this software, see the following webpage: "; \
-			${MAKE} www-site; \
-		fi; \
-	fi
+.ORDER: ${_FETCH_SEQ}
+.ORDER: ${_EXTRACT_SEQ}
+.ORDER: ${_PATCH_SEQ}
+.ORDER: ${_CONFIGURE_SEQ}
+.ORDER: ${_BUILD_SEQ}
+.ORDER: ${_INSTALL_SEQ}
+.ORDER: ${_PACKAGE_SEQ}
 
-${PACKAGE_COOKIE}:
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} install
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-package
+.if !exists(${EXTRACT_COOKIE})
+${EXTRACT_COOKIE}: ${_EXTRACT_SEQ}
+	@${TOUCH} ${TOUCH_FLAGS} ${EXTRACT_COOKIE}
+.endif
 
-# And call the macros
+.if !exists(${PATCH_COOKIE})
+${PATCH_COOKIE}: ${_PATCH_SEQ}
+.if !defined(PATCH_CHECK_ONLY)
+	@${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
+.endif
 
-real-fetch: _PORT_USE
-real-extract: _PORT_USE
+.endif
+.if !exists(${CONFIGURE_COOKIE})
+${CONFIGURE_COOKIE}: ${_CONFIGURE_SEQ}
+	@${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE}
+.endif
+
+.if !exists(${BUILD_COOKIE})
+${BUILD_COOKIE}: ${_BUILD_SEQ}
+	@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE}
+.endif
+
+.if !exists(${INSTALL_COOKIE})
+${INSTALL_COOKIE}: ${_INSTALL_SEQ}
+	@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
+.endif
+
+.if !exists(${PACKAGE_COOKIE})
+${PACKAGE_COOKIE}: ${_PACKAGE_SEQ}
+	@${TOUCH} ${TOUCH_FLAGS} ${PACKAGE_COOKIE}
+.endif
+
+extract-message:
 	@${ECHO_MSG} "===>  Extracting for ${PKGNAME}"
-real-patch: _PORT_USE
+patch-message:
 	@${ECHO_MSG} "===>  Patching for ${PKGNAME}"
-real-configure: _PORT_USE
+configure-message:
 	@${ECHO_MSG} "===>  Configuring for ${PKGNAME}"
-real-build: _PORT_USE
+build-message:
 	@${ECHO_MSG} "===>  Building for ${PKGNAME}"
-real-install: _PORT_USE
+install-message:
 	@${ECHO_MSG} "===>  Installing for ${PKGNAME}"
-real-package: _PORT_USE
+package-message:
+	@${ECHO_MSG} "===>  Building package for ${PKGNAME}"
 
-# Empty pre-* and post-* targets, note we can't use .if !target()
-# in the _PORT_USE macro
+# Empty pre-* and post-* targets
 
+.for stage in pre post
 .for name in fetch extract patch configure build install package
 
-.if !target(pre-${name})
-pre-${name}:
+.if !target(${stage}-${name})
+${stage}-${name}:
 	@${DO_NADA}
 .endif
 
-.if !target(post-${name})
-post-${name}:
-	@${DO_NADA}
+.if !target(${stage}-${name}-script)
+${stage}-${name}-script:
+	@if [ -f ${SCRIPTDIR}/${.TARGET:S/-script$//} ]; then \
+		cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
+			${SCRIPTDIR}/${.TARGET:S/-script$//}; \
+	fi
 .endif
 
 .endfor
+.endfor
 
 .if defined(GNOME_OPTION_MSG) && (!defined(PACKAGE_BUILDING) || !defined(BATCH))
 pre-everything:: echo-gnome-option-msg
@@ -2582,6 +2598,7 @@
 
 .if !target(patch-libtool)
 patch-libtool:
+.if defined(USE_LIBTOOL)
 	@(if ${LIBTOOL} --version | grep -vq "1\.3\.4-freebsd-ports"; then \
 		(${ECHO} "Your libtool installation is out of date. Please remove"; \
 		 ${ECHO} "and reinstall ${PORTSDIR}/devel/libtool."; \
@@ -2595,6 +2612,9 @@
 			-e "s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} $${LIBTOOLDIR}/ltmain.sh^g" \
 			$$file.tmp > $$file; \
 	 done);
+.else
+	@${DO_NADA}
+.endif
 .endif
 
 # Checkpatch
@@ -2798,10 +2818,7 @@
 
 
 .if !target(checksum)
-checksum:
-.if !defined(REAL_EXTRACT)
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch
-.endif
+checksum: fetch
 	@if [ ! -f ${MD5_FILE} ]; then \
 		${ECHO_MSG} ">> No MD5 checksum file."; \
 	else \
@@ -2870,7 +2887,8 @@
 .if !target(package-noinstall)
 package-noinstall:
 	@${MKDIR} ${WRKDIR}
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} PACKAGE_NOINSTALL=yes real-package
+	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pre-package \
+		pre-package-script do-package post-package-script
 	@${RM} -f ${TMPPLIST}
 	-@${RMDIR} ${WRKDIR}
 .endif
@@ -2880,22 +2898,7 @@
 ################################################################
 
 .if !target(depends)
-depends: lib-depends misc-depends
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch-depends
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} build-depends
-	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} run-depends
-
-.if make(fetch-depends)
-DEPENDS_TMP+=	${FETCH_DEPENDS}
-.endif
-
-.if make(build-depends)
-DEPENDS_TMP+=	${BUILD_DEPENDS}
-.endif
-
-.if make(run-depends)
-DEPENDS_TMP+=	${RUN_DEPENDS}
-.endif
+depends: lib-depends misc-depends fetch-depends build-depends run-depends
 
 .if defined(ALWAYS_BUILD_DEPENDS)
 _DEPEND_ALWAYS=	1
@@ -2903,10 +2906,11 @@
 _DEPEND_ALWAYS=	0
 .endif
 
-_DEPENDS_USE:	.USE
-.if defined(DEPENDS_TMP)
+.for deptype in FETCH BUILD RUN
+${deptype:L}-depends:
+.if defined(${deptype}_DEPENDS)
 .if !defined(NO_DEPENDS)
-	@for i in ${DEPENDS_TMP}; do \
+	@for i in ${${deptype}_DEPENDS}; do \
 		prog=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \
 		dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \
 		if ${EXPR} "$$dir" : '.*:' > /dev/null; then \
@@ -2957,10 +2961,7 @@
 .else
 	@${DO_NADA}
 .endif
-
-fetch-depends:	_DEPENDS_USE
-build-depends:	_DEPENDS_USE
-run-depends:	_DEPENDS_USE
+.endfor
 
 lib-depends:
 .if defined(LIB_DEPENDS)
@@ -3317,6 +3318,7 @@
 # Compress (or uncompress) and symlink manpages.
 .if !target(compress-man)
 compress-man:
+.if defined(_MANPAGES) || defined(_MLINKS)
 .if ${MANCOMPRESSED} == yes && defined(NOMANCOMPRESS)
 	@${ECHO_MSG} "===>   Uncompressing manual pages for ${PKGNAME}"
 	@_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE}
@@ -3337,6 +3339,9 @@
 		shift; shift; \
 	done
 .endif
+.else
+	@${DO_NADA}
+.endif
 .endif
 
 # Fake installation of package so that user can pkg_delete it later.
@@ -3345,6 +3350,7 @@
 
 .if !target(fake-pkg)
 fake-pkg:
+.if !defined(NO_PKG_REGISTER)
 	@if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi
 	@${RM} -f /tmp/${PKGNAME}-required-by
 .if defined(FORCE_PKG_REGISTER)
@@ -3384,6 +3390,9 @@
 		${CAT} /tmp/${PKGNAME}-required-by >> ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY; \
 		${RM} -f /tmp/${PKGNAME}-required-by; \
 	fi
+.else
+	@${DO_NADA}
+.endif
 .endif
 
 # Depend is generally meaningless for arbitrary ports, but if someone wants

--------------208F773B37C5BCC71EFB9663--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C7544E3.2CC013B4>