From matthias.andree@gmx.de  Sun Aug 20 00:39:14 2006
Return-Path: <matthias.andree@gmx.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B643716A4E0
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Aug 2006 00:39:14 +0000 (UTC)
	(envelope-from matthias.andree@gmx.de)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by mx1.FreeBSD.org (Postfix) with SMTP id 5ABDC43D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 Aug 2006 00:39:12 +0000 (GMT)
	(envelope-from matthias.andree@gmx.de)
Received: (qmail invoked by alias); 20 Aug 2006 00:39:11 -0000
Received: from p50913C23.dip0.t-ipconnect.de (EHLO m2a2.dyndns.org) [80.145.60.35]
  by mail.gmx.net (mp024) with SMTP; 20 Aug 2006 02:39:11 +0200
Received: from localhost (localhost [127.0.0.1])
	by merlin.emma.line.org (Postfix) with ESMTP id 04422201517;
	Sun, 20 Aug 2006 02:39:10 +0200 (CEST)
Received: from m2a2.dyndns.org ([127.0.0.1])
 by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 21411-19; Sun, 20 Aug 2006 02:39:09 +0200 (CEST)
Received: from libertas.emma.line.org (libertas.emma.line.org [192.168.1.2])
	by merlin.emma.line.org (Postfix) with ESMTP id C18CC201325;
	Sun, 20 Aug 2006 02:39:09 +0200 (CEST)
Received: by libertas.emma.line.org (Postfix, from userid 1001)
	id 8BF0E35; Sun, 20 Aug 2006 02:39:09 +0200 (CEST)
Message-Id: <20060820003909.8BF0E35@libertas.emma.line.org>
Date: Sun, 20 Aug 2006 02:39:09 +0200 (CEST)
From: Matthias Andree <matthias.andree@gmx.de>
Reply-To: Matthias Andree <matthias.andree@gmx.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: portmgr@freebsd.org,ports@freebsd.org
Subject: DESTDIR silently breaks CONFLICTS 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102300
>Category:       ports
>Synopsis:       DESTDIR silently breaks CONFLICTS
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 20 00:40:14 GMT 2006
>Closed-Date:    Wed Sep 20 04:05:53 GMT 2006
>Last-Modified:  Wed Sep 20 04:10:30 GMT 2006
>Originator:     Matthias Andree
>Release:        FreeBSD 6.1-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD libertas.emma.line.org 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #13: Sat Jul 15 11:21:56 CEST 2006 toor@libertas.emma.line.org:/usr/obj/usr/src/sys/MA6 i386


	
>Description:
The new DESTDIR scheme in ports/Mk/bsd.port.mk *silently* breaks CONFLICTS,
ports built with default (empty) DESTDIR have no CONFLICTS recorded.

Cause: DESTDIR isn't defined by default, hence this part in ports/Mk/bsd.port.mk
lines 2304 ff.:

# Does the pkg_create tool support conflict checking?
# XXX Slow?
.if !defined(PKGINSTALLVER)
PKGINSTALLVER!= ${CHROOT} ${DESTDIR} ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
.endif

expands to:

PKGINSTALLVER!= chroot  /usr/sbin/pkg_info -P | sed -e 's/.*: //'

which causes chroot to complain "chroot: /usr/sbin/pkg_info: Not a directory"
- however this message is usually discarded.

You can check this (DESTDIR must not be set) easily with:

$ cd /usr/ports/security/openvpn # this isn't specific to OpenVPN
                                 # but must happen in some port directory
$ pkg_info -P
Package tools revision: 20040629
$ make -V DESTDIR

$ make -V PKGINSTALLVER

$ make -V DISABLE_CONFLICTS
YES

	
>How-To-Repeat:
	
>Fix:
Either set a reasonable default for DESTDIR, or omit the CHROOT if DESTDIR is
an empty string.
	
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 20 00:48:51 UTC 2006 
Responsible-Changed-Why:  
assign to portmgr for investigation 

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

From: Matthias Andree <matthias.andree@gmx.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/102300: DESTDIR silently breaks CONFLICTS
Date: Sun, 20 Aug 2006 02:51:25 +0200

 Suggested fix (tested on FreeBSD 6.1-RELEASE-p3 i386) for consistency
 with other stuff in the Makefile -- note it would be better to get rid
 of this special casing everywhere and define a new variable,
 MAYBE_CHROOT, to either ${CHROOT} ${DESTDIR} or empty in a
 central place, so there needs to be only one .if defined(DESTDIR).
 
 Perhaps there should also be a safety net that causes the Makefile to
 abort if PKGINSTALLVER is empty or 0.
 
 --- /usr/ports/Mk/bsd.port.mk.orig	Sun Aug 20 02:28:56 2006
 +++ /usr/ports/Mk/bsd.port.mk	Sun Aug 20 02:44:58 2006
 @@ -2304,7 +2304,11 @@
  # Does the pkg_create tool support conflict checking?
  # XXX Slow?
  .if !defined(PKGINSTALLVER)
 +.if !defined(DESTDIR)
 +PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
 +.else
  PKGINSTALLVER!= ${CHROOT} ${DESTDIR} ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
 +.endif
  .endif
  .if ${PKGINSTALLVER} < 20030417
  DISABLE_CONFLICTS=	YES
 
 -- 
 Matthias Andree
State-Changed-From-To: open->analyzed 
State-Changed-By: linimon 
State-Changed-When: Fri Sep 15 07:42:39 UTC 2006 
State-Changed-Why:  
kris is running a test build on the cluster with this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102300 
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Wed Sep 20 04:04:46 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96088 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Wed Sep 20 04:04:46 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102750 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Wed Sep 20 04:04:46 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102514 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Wed Sep 20 04:04:46 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/102300: commit references a PR
Date: Wed, 20 Sep 2006 04:02:16 +0000 (UTC)

 kris        2006-09-20 04:02:09 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.port.mk 
   Log:
   * Add missing '|| true' to silence an @unexec rmdir [1]
   
   * Repair CONFLICTS, which was broken by previous DESTDIR changes [2]
   
   * Use "set --" instead of "set" for better robustness [3]
   
   * Avoid :L modifier in ${USE_LDCONFIG} which broke e.g. /usr/X11R6
     ports [4]
   
   * Correct a comment typo [4]
   
   * Force passive FTP mode by default (this is already the default with
     the standard login class, so this is a NOP for most users) [5].
   
   PR:             ports/101809 [1], ports/102300 [2], ports/102514 [3],
                   ports/102750 [4], ports/96088 [5]
   Submitted by:   bsam [1], Matthias Andree <matthias.andree@gmx.de> [2],
                   infofarmer [3], flz [4],
                   Darren Pilgrim <darren.pilgrim@bitfreak.org> [5]
   
   Revision  Changes    Path
   1.542     +14 -10    ports/Mk/bsd.port.mk
 _______________________________________________
 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"
 
>Unformatted:
