Subject: pkg/31490: pkgsrc stomps on *BSD make variable namespace
To: None <,,>
From: Hauke Fath <>
List: pkgsrc-bugs
Date: 10/06/2005 09:23:00
>Number:         31490
>Category:       pkg
>Synopsis:       pkgsrc stomps on *BSD make variable namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 06 09:23:00 +0000 2005
>Originator:     Hauke Fath <>
>Release:        NetBSD 2.0_STABLE
/~\  The ASCII Ribbon Campaign                    Hauke Fath
\ /    No HTML/RTF in email	        Institut für Nachrichtentechnik
 X     No Word docs in email	                  TU Darmstadt
/ \  Respect for open standards              Ruf +49-6151-16-3281
System: NetBSD heiligenberg 2.0_STABLE NetBSD 2.0_STABLE (HEILIGENBERG) #6: Tue Jul 19 16:15:57 CEST 2005 hf@heiligenberg:/var/obj/netbsd-builds/2_0/i386/sys/arch/i386/compile/HEILIGENBERG i386
Architecture: i386
Machine: i386

	pkgsrc does not respect the *BSD make variables that the base
	OS defines in /usr/share/mk. As a result, seemingly
	conspicuous /etc/mk.conf entries can break builds in most
	unexpected ways.


	Set USE_TOOLS=no in /etc/mk.conf, and watch bulk builds fail
	in weird ways.

	grep(1) around and find that pkgsrc scripts "re-use"
	well-known base	OS make	variables in unexpected ways.

	A clean solution would be to keep pkgsrc make variables in a
	seperate namespace.

	Plan B is to set up /etc/mk.conf like

	.ifdef BSD_PKG_MK
	# pkgsrc variables go here


	# base OS variables go here



	The need for this as well as the proper setup needs to be
	documented prominently in doc/pkgsrc.txt as well as with a
	mk.conf sample file, probably both in pkgsrc _and_ in the NetBSD
	/usr/share/examples section.