Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2012 21:39:14 GMT
From:      Olli Hauer <ohauer@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/170796: [patch] Mk/bsd.port.mk fix usage of PKG_DEPENDS
Message-ID:  <201208202139.q7KLdEAB034016@freefall.freebsd.org>
Resent-Message-ID: <201208202140.q7KLeBWT034058@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         170796
>Category:       ports
>Synopsis:       [patch] Mk/bsd.port.mk fix usage of PKG_DEPENDS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 20 21:40:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Olli Hauer
>Release:        
>Organization:
>Environment:

>Description:
Given a central machine which fetch sources for all other
machines for caching (the others do not have internet access)

Since most ports are using CONFLICTS instead 
CONFLICTES_(BUILD|INSTALL), I use on this machine the
follwing command to fetch fresh sources after every
portstree update.

$> env -i PKG_DBDIR=/var/empty LOCALBASE=/var/empty make fetch -C /usr/ports/mail/postfix
===>  Found saved configuration for postfix-2.9.0,1
===>   postfix-2.9.4,1 depends on file: /var/empty/sbin/pkg - not found
===>    Verifying install for /var/empty/sbin/pkg in /usr/ports/ports-mgmt/pkg
===>  Extracting for pkg-1.0.r6
=> SHA256 Checksum OK for pkg-1.0-rc6.tar.xz.
===>  Patching for pkg-1.0.r6
===>  Configuring for pkg-1.0.r6
===>  Building for pkg-1.0.r6
===> external (all)
===> external/sqlite (all)
....

If pkgng is used, then this simple fetch command does not
work. It tries to build `pkg' as fetch dependency.
As workaround a condition in bsd.port.mk will be nice (patch b).

The params 
 -DBATCH -DDISABLE_VULNERABILITIES -DDISABLE_CONFLICTS \
 -DDEFER_CONFLICTS_CHECK -DDISABLE_LICENSES -DDISABLE_SECURITY_CHECK \
 -DAP_IGNORE_VERSION_CHECK

do not work in any case, therfore I use additional the `env' command.

>How-To-Repeat:
$> env -i PKG_DBDIR=/var/empty LOCALBASE=/var/empty make fetch -C /usr/ports/mail/postfix

>Fix:
a) 
--- PR_Mk__bsd.port.mk.diff begins here ---
Index: /usr/ports/Mk/bsd.port.mk
===================================================================
--- /usr/ports/Mk/bsd.port.mk	(revision 302826)
+++ /usr/ports/Mk/bsd.port.mk	(working copy)
@@ -4271,7 +4273,7 @@
 
 _PKG_DEP=		check-sanity
 _PKG_SEQ=		pkg-depends
-_FETCH_DEP=		pkg
+#_FETCH_DEP=		pkg
 _FETCH_SEQ=		fetch-depends pre-fetch pre-fetch-script \
 				do-fetch post-fetch post-fetch-script
 _EXTRACT_DEP=	fetch
--- PR_Mk__bsd.port.mk.diff ends here ---


b) workaround instead a)

--- PR_Mk__bsd.port.mk.diff2 begins here ---
Index: /usr/ports/Mk/bsd.port.mk
===================================================================
--- /usr/ports/Mk/bsd.port.mk	(revision 302826)
+++ /usr/ports/Mk/bsd.port.mk	(working copy)
@@ -1626,9 +1626,11 @@
 
 .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
--- PR_Mk__bsd.port.mk.diff2 ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208202139.q7KLdEAB034016>