NetBSD Problem Report #48416

From  Fri Nov 29 23:06:14 2013
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 1C795A634A
	for <>; Fri, 29 Nov 2013 23:06:14 +0000 (UTC)
Message-Id: <>
Date: Fri, 29 Nov 2013 23:06:13 +0000 (UTC)
Subject: pkgtools/pkgin's makefile reads pkgsrc mk.conf
X-Send-Pr-Version: 3.95

>Number:         48416
>Category:       pkg
>Synopsis:       pkgtools/pkgin's makefile reads pkgsrc mk.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jperkin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 29 23:10:00 +0000 2013
>Last-Modified:  Tue Apr 03 14:34:49 +0000 2018
>Originator:     David A. Holland
>Release:        pkgsrc 20131129

pkgin's makefile (the package's own makefile, not the pkgsrc makefile)
contains the following interesting logic:

# satisfy mk.conf
BSD_PKG_MK=     1
.for MK_CONF in /etc/mk.conf @prefix@/etc/mk.conf /etc/pkgsrc.conf
.       if exists(${MK_CONF})
.               include "${MK_CONF}"
.       endif

This caused it to fail for me just now because it does this without
setting pkgsrc variables, like PKGPATH, that I was using in the
control logic of a bulk build's mk.conf.

It can also cause problems because a few lines after it does this it
includes <>, which also reads mk.conf; and with BSD_PKG_MK
still set, <> may get wrong or invalid (or missing)

It's also entirely inappropriate from the perspective of how pkgsrc is
constructed and expected to work.


Watch it fail to build, inspect why.


Delete this block.

The only catch is, I don't see what it's trying to accomplish by being
there, so this might break something.



Responsible-Changed-From-To: pkg-manager->imil
Responsible-Changed-When: Fri, 29 Nov 2013 23:20:02 +0000
Over to author

Responsible-Changed-From-To: imil->pkg-manager
Responsible-Changed-When: Mon, 02 Apr 2018 09:33:18 +0000
imil observes

Responsible-Changed-From-To: pkg-manager->jperkin
Responsible-Changed-When: Tue, 03 Apr 2018 14:34:49 +0000
I'll take this.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.