From nobody@FreeBSD.org  Wed Jun  4 14:05:57 2008
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 B199B1065675
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  4 Jun 2008 14:05:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B6428FC28
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  4 Jun 2008 14:05:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m54E5tVl035982
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 4 Jun 2008 14:05:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m54E5sp4035981;
	Wed, 4 Jun 2008 14:05:54 GMT
	(envelope-from nobody)
Message-Id: <200806041405.m54E5sp4035981@www.freebsd.org>
Date: Wed, 4 Jun 2008 14:05:54 GMT
From: James Kelly <jjk@tilted.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Portmaster can miss deps if previous port has CONFLICTS and current one does not
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         124271
>Category:       ports
>Synopsis:       ports-mgmt/portmaster can miss deps if previous port has CONFLICTS and current one does not
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 04 14:10:03 UTC 2008
>Closed-Date:    Wed Jun 04 21:23:32 UTC 2008
>Last-Modified:  Wed Jun 04 21:23:32 UTC 2008
>Originator:     James Kelly
>Release:        6.3-RELEASE-p2
>Organization:
Tilted Planet, Ltd.
>Environment:
FreeBSD crinoid.build.psq.ord.tilted.net 6.3-RELEASE-p2 FreeBSD 6.3-RELEASE-p2 #4: Mon Apr 28 07:37:08 CDT 2008     jjk@stubby.tilted.net:/usr/build/FreeBSD_6_3/obj/amd64/usr/build/FreeBSD_6_3/src/sys/DELLYKINS  amd64
>Description:
When checking dependencies of a port and the port has multiple
dependencies, the conflicts list of the previous port will be re-used
if the current port does not have any conflicts.  This can result in
not installing some dependencies.  It may just be runtime-dependencies
that it can miss -- it only showed up for me when working on
runtime-dependencies in databases/mytop.  Most likely though, it can
show up in all forms of dependency resolution.
>How-To-Repeat:
"sudo portmaster databases/mytop" on a system without all of it's runtime deps installed.
>Fix:
unset or set conflicts to a blank value before looking for CONFLICTS in the probed port's Makefile.  I've attached a patch to set conflicts to a blank value, which fixes this problem for me.

Patch attached with submission follows:

Index: ports/ports-mgmt/portmaster/files/portmaster.sh.in
===================================================================
--- ports/ports-mgmt/portmaster/files/portmaster.sh.in	(revision 2275)
+++ ports/ports-mgmt/portmaster/files/portmaster.sh.in	(revision 2276)
@@ -1453,6 +1453,7 @@
 		[ -z "$URB_YES" ] &&
 			case "$CUR_DEPS" in *:${origin}:*) continue ;; esac
 
+		conflicts=''
 		if pm_cd $d_port; then
 			grep -ql ^CONFLICTS Makefile &&
 				conflicts=`pm_make_b -V CONFLICTS`


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->dougb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jun 4 16:30:29 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124271 
State-Changed-From-To: open->analyzed 
State-Changed-By: dougb 
State-Changed-When: Wed Jun 4 20:01:25 UTC 2008 
State-Changed-Why:  

Thanks for bringing this to my attention. It's a side effect 
of the optimization I did for not running the make command 
if a port doesn't have CONFLICTS set. I've got a new version 
in the works that will fix this bug. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/124271: commit references a PR
Date: Wed,  4 Jun 2008 21:17:35 +0000 (UTC)

 dougb       2008-06-04 21:17:30 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ports-mgmt/portmaster/files portmaster.sh.in 
   Log:
   New Features
   ===========
   1. By popular demand, change the command line behavior of 'portmaster blah*'
   to update all ports in /var/db/pkg which match the glob.
   2. Add the -K flag to avoid cleaning the work directory after the build.[1]
   
   Bug Fixes
   =========
   1. Instead of /etc/portmaster.rc we should be reading
   /usr/local/etc/portmaster.rc.[2] Begin introducing support for that.
   2. If using the -n option, don't try to fetch the distfiles.[3]
   3. When I added the optimization to only run 'make -V CONFLICTS' if
   it existed in the Makefile I neglected to unset the value of $conflicts
   in the script between ports.[4]
   4. I ran into a port which set VERBOSE to a value that it needed to use
   in its build process, and since I was using the -v option for portmaster
   (which sets VERBOSE=yes) the build failed. To work around this, prefix
   the variable names for common English words (VERBOSE, FORCE, BUILDING)
   with PM_.
   5. To aid future debugging (as in 4. above) change the values of flag
   variables to something meaningful instead of just "yes."
   6. Automatically handle the case where the parent port has MOVED instead
   of asking the user to re-run portmaster with the right options.
   
   Submitted by:   pav [1]
   Submitted by:   Miroslav Lachman 000.fbsd@quip.cz [2]
   Submitted by:   Jiawei Ye <leafy7382@gmail.com> [3]
   
   PR:             ports/124271 [4]
   Submitted by:   James Kelly <jjk@tilted.net> [4]
   
   Revision  Changes    Path
   2.3       +152 -147  ports/ports-mgmt/portmaster/files/portmaster.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: dougb 
State-Changed-When: Wed Jun 4 21:23:15 UTC 2008 
State-Changed-Why:  

Fixed in version 2.3. Thanks again! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124271 
>Unformatted:
