From nobody@FreeBSD.org  Mon Jan 23 02:13:03 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6C1091065670
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jan 2012 02:13:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 574DD8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jan 2012 02:13:03 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0N2D3UG049271
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Jan 2012 02:13:03 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q0N2D2oX049263;
	Mon, 23 Jan 2012 02:13:02 GMT
	(envelope-from nobody)
Message-Id: <201201230213.q0N2D2oX049263@red.freebsd.org>
Date: Mon, 23 Jan 2012 02:13:02 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make package-recursive fails with noise
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         164390
>Category:       ports
>Synopsis:       [bsd.port.mk] make package-recursive fails with noise
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    portmgr
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 23 02:20:07 UTC 2012
>Closed-Date:    
>Last-Modified:  Sun Feb 03 22:30:17 UTC 2013
>Originator:     Garrett Cooper
>Release:        9.0-STABLE
>Organization:
iXsystems, Inc.
>Environment:
FreeBSD bayonetta.local 9.0-STABLE FreeBSD 9.0-STABLE #4 r230371M: Thu Jan 19 23:55:38 PST 2012     gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA  amd64
>Description:
make package-recursive fails today [with noise] as follows:

# make -C /usr/ports/databases/mysql55-server/ package-recursive
===>  Building package for mysql-server-5.5.20
rmdir: /usr/ports/devel/cmake/work: Directory not empty
*** [package-noinstall] Error code 1 (ignored)
rmdir: /usr/ports/databases/mysql55-client/work: Directory not empty
*** [package-noinstall] Error code 1 (ignored)

The problem is that dependent packages aren't being cleaned:

# find /usr/ports/devel/cmake/work | wc -l
    5159
# find /usr/ports/databases/mysql55-client/work/ | wc -l
   10620
>How-To-Repeat:
make -C /usr/ports/databases/mysql55-server/ package-recursive
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 23 03:28:22 UTC 2012 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164390 
Responsible-Changed-From-To: ale->portmgr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 23 04:30:18 UTC 2012 
Responsible-Changed-Why:  
Apparently is a generic problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164390 

From: Garrett Cooper <yaneurabeya@gmail.com>
To: <FreeBSD-gnats-submit@FreeBSD.org>, <freebsd-ports-bugs@FreeBSD.org>
Cc:  
Subject: Re: ports/164390: make package-recursive fails with noise
Date: Thu, 26 Apr 2012 13:15:50 -0700

 --Apple-Mail=_6CF04D2D-A4A8-4D90-858D-B435AF0D7CA9
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain; charset="us-ascii"
 
 	Here's a working, hacky patch that makes package-recursive work. =
 check-already-installed and the installation code will need to be =
 revised for the "ports 2.0" work that I have going on in the background.
 Thanks,
 -Garrett
 
 PS Please dupe ports/167191 to this bug.
 
 
 --Apple-Mail=_6CF04D2D-A4A8-4D90-858D-B435AF0D7CA9
 Content-Disposition: attachment; filename="fix-package-recursive.patch"
 Content-Type: application/octet-stream; x-unix-mode=0644;
 	name="fix-package-recursive.patch"
 Content-Transfer-Encoding: 7bit
 
 --- Mk/bsd.port.mk	2012-04-25 12:48:58.000000000 -0700
 +++ Mk/bsd.port.mk	2012-04-25 12:51:33.000000000 -0700
 @@ -5488,9 +5488,14 @@
  
  # Build packages for port and dependencies
  
 -package-recursive: package
 -	@for dir in $$(${ALL-DEPENDS-LIST}); do \
 -		(cd $$dir; ${MAKE} package-noinstall); \
 +package-recursive: 
 +	@for dir in $$(${ALL-DEPENDS-LIST}) ${.CURDIR}; do \
 +		cd $$dir; \
 +		if ${MAKE} check-already-installed >/dev/null 2>&1; then \
 +			${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}; \
 +			${MAKE} install; \
 +		fi; \
 +		${MAKE} package-noinstall; \
  	done
  
  # Show missing dependencies
 
 --Apple-Mail=_6CF04D2D-A4A8-4D90-858D-B435AF0D7CA9--

From: Garrett Cooper <yaneurabeya@gmail.com>
To: bug-followup@FreeBSD.org, yanegomi@gmail.com
Cc:  
Subject: Re: ports/164390: [bsd.port.mk] make package-recursive fails with noise
Date: Thu, 26 Apr 2012 19:25:04 -0700

     For the record, the noise is actually 'good' in a way. I tested
 out changing ${RMDIR} ${WRKDIR} -> ${RM} -rf ${WRKDIR}, and that
 actually increased the amount of time required to compile packages.
 So, noise aside, I didn't care and just fixed the issue that needed to
 be fixed (package-recursive not working).
     Again, a better solution is going to be thought up soon.
 Thanks!
 -Garrett
>Unformatted:
