Bug 170552

Summary: bsd.port.mk: Fix CONFIGURE_FAIL_MESSAGE to be pkgng-aware
Product: Ports & Packages Reporter: Chris Rees <crees>
Component: Individual Port(s)Assignee: Beat Gaetzi <beat>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
bsd.port.mk-configure-fail-message.diff none

Description Chris Rees freebsd_committer freebsd_triage 2012-08-12 11:20:03 UTC
	If configure fails, a message is printed asking the user to ls /var/db/pkg to get all packages installed.

	For years, this has worked fine... but nowadays:

[crees@pegasus]~% ls /var/db/pkg
/var/db/pkg/repo.sqlite
/var/db/pkg/local.sqlite

Fix: pkg_info -Ea and pkg info -Ea both do what is required here.

	Really, this shouldn't require an exp-run, but I guess it wouldn't hurt to stick it in with another change.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-12 11:20:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Beat Gaetzi freebsd_committer freebsd_triage 2012-08-22 10:32:57 UTC
Responsible Changed
From-To: portmgr->beat

Take for exp-run.
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-08-30 16:31:40 UTC
Author: beat
Date: Thu Aug 30 15:31:25 2012
New Revision: 303381
URL: http://svn.freebsd.org/changeset/ports/303381

Log:
  - Add ccache support for building ports. [1]
  - Fix CONFIGURE_FAIL_MESSAGE to be pkgng-aware. [2]
  - Resolve symlinks in PREFIX on deinstall. [3]
  - Introduce CLEAN_FETCH_ENV variable to disable package dependency
    in fetch target for mass fetching. [4]
  
  PR:		ports/169579 [1], ports/170552 [2],
  		ports/170784 [3], ports/170796 [4]
  Submitted by:	bdrewery@ [1], crees@ [2], gahr@ [3], ohauer@ [4]
  Tested on:	pointyhat

Modified:
  head/CHANGES
  head/Mk/bsd.port.mk

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Thu Aug 30 15:17:20 2012	(r303380)
+++ head/CHANGES	Thu Aug 30 15:31:25 2012	(r303381)
@@ -10,6 +10,22 @@ in the release notes and/or placed into 
 
 All ports committers are allowed to commit to this file.
 
+20120830:
+AUTHOR: beat@FreeBSD.org
+
+  * CCACHE support for building ports has been added (depends on
+    devel/ccache). Therefore new user settable variables are available:
+
+    WITH_CCACHE_BUILD - Enable CCACHE support (Default off)
+
+    NO_CCACHE         - Disable CCACHE support for example for certain
+                        ports if CCACHE is enabled.
+
+    By default CCACHE uses $HOME/.ccache as cache directory. To use
+    a non-default cache directory this could be overwritten like:
+
+    MAKE_ENV+= CCACHE_DIR=/var/cache/ccache
+
 20120820:
 AUTHOR: gahr@FreeBSD.org
 

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Thu Aug 30 15:17:20 2012	(r303380)
+++ head/Mk/bsd.port.mk	Thu Aug 30 15:31:25 2012	(r303381)
@@ -833,6 +833,9 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #				  Default: none
 # FETCH_REGET	- Times to retry fetching of files on checksum errors.
 #				  Default: 1
+# CLEAN_FETCH_ENV		
+#				- Disable package dependency in fetch target for mass
+#				  fetching.  User settable.
 #
 # For extract:
 #
@@ -934,6 +937,13 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #				  that are explicitly marked MAKE_JOBS_UNSAFE.  User settable.
 # MAKE_JOBS_NUMBER
 #				- Override the number of make jobs to be used.  User settable.
+## cacche
+#
+# WITH_CCACHE_BUILD
+# 				- Enable CCACHE support (devel/ccache).  User settable.
+# NO_CCACHE
+#				- Disable CCACHE support for example for certain ports if
+#				  CCACHE is enabled.  User settable.
 #
 # For install:
 #
@@ -1626,9 +1636,11 @@ PLIST_SUB+=	LIB32DIR=${LIB32DIR}
 
 .if defined(WITH_PKGNG)
 .if !defined(PKG_DEPENDS)
+.if !defined(CLEAN_FETCH_ENV)
 PKG_DEPENDS+=		${LOCALBASE}/sbin/pkg:${PORTSDIR}/ports-mgmt/pkg
 .endif
 .endif
+.endif
 
 .if defined(USE_ZIP)
 EXTRACT_DEPENDS+=	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
@@ -2217,6 +2229,19 @@ BUILD_FAIL_MESSAGE+=	"You have chosen to
 .endif
 .endif
 
+# ccache support
+# Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and
+# don't use if ccache already set in CC
+.if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*}
+# Avoid depends loops between pkg and ccache
+.	if !${.CURDIR:M*/devel/ccache} && !${.CURDIR:M*/ports-mgmt/pkg}
+BUILD_DEPENDS+=		${LOCALBASE}/bin/ccache:${PORTSDIR}/devel/ccache
+.	endif
+
+# Prepend the ccache dir into the PATH and setup ccache env
+MAKE_ENV+=	PATH=${LOCALBASE}/libexec/ccache:${PATH}
+.endif
+
 PTHREAD_CFLAGS?=
 PTHREAD_LIBS?=		-pthread
 
@@ -2908,7 +2933,7 @@ CONFIGURE_TARGET:=	${CONFIGURE_TARGET:S/
 CONFIGURE_LOG?=		config.log
 
 # A default message to print if do-configure fails.
-CONFIGURE_FAIL_MESSAGE?=	"Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. an \`ls ${PKG_DBDIR}\`)."
+CONFIGURE_FAIL_MESSAGE?=	"Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)."
 
 .if defined(GNU_CONFIGURE)
 # Maximum command line length
@@ -4474,7 +4499,7 @@ deinstall:
 			check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
 			if [ "$${check_name}" = "${PKGBASE}" ]; then \
 					prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
-					if [ "x${PREFIX}" = "x$${prfx}" ]; then \
+					if [ "x`${READLINK_CMD} -f ${PREFIX}`" = "x$${prfx}" ]; then \
 							${ECHO_MSG} "===>   Deinstalling $${p}"; \
 							${PKG_DELETE} -f $${p}; \
 					else \
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Beat Gaetzi freebsd_committer freebsd_triage 2012-08-30 16:34:02 UTC
State Changed
From-To: open->closed

Committed. Thanks!