pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48416: pkgtools/pkgin's makefile reads pkgsrc mk.conf



>Number:         48416
>Category:       pkg
>Synopsis:       pkgtools/pkgin's makefile reads pkgsrc mk.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 29 23:10:00 +0000 2013
>Originator:     David A. Holland
>Release:        pkgsrc 20131129
>Organization:
>Environment:
n/a
>Description:

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
.endfor

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 <bsd.own.mk>, which also reads mk.conf; and with BSD_PKG_MK
still set, <bsd.own.mk> may get wrong or invalid (or missing)
configuration.

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

>How-To-Repeat:

Watch it fail to build, inspect why.

>Fix:

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.



Home | Main Index | Thread Index | Old Index