Bug 170796

Summary: [patch] Mk/bsd.port.mk fix usage of PKG_DEPENDS
Product: Ports & Packages Reporter: Olli Hauer <ohauer>
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
PR_Mk__bsd.port.mk.diff
none
file.diff none

Description Olli Hauer freebsd_committer freebsd_triage 2012-08-20 22:40:10 UTC
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.

Fix: a) 
b) workaround instead a)
How-To-Repeat: $> env -i PKG_DBDIR=/var/empty LOCALBASE=/var/empty make fetch -C /usr/ports/mail/postfix
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-20 22:40: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:15 UTC
Responsible Changed
From-To: portmgr->beat

Take for exp-run.
Comment 3 Beat Gaetzi freebsd_committer freebsd_triage 2012-08-30 16:34:39 UTC
State Changed
From-To: open->closed

Committed. Thanks!