pkgsrc-Bugs archive

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

pkg/48110: PKG_DBDIR in /etc/pkg_install.conf is ignored by pkgsrc make

>Number:         48110
>Category:       pkg
>Synopsis:       PKG_DBDIR in /etc/pkg_install.conf is ignored by pkgsrc make
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 08 14:35:00 +0000 2013
>Originator:     Toby Karyadi
>Release:        NetBSD 6.1
NetBSD 6.1 NetBSD 6.1 (XEN3_DOM0) amd64
The PKG_DBDIR variable in /etc/pkg_install.conf is obeyed by pkg_add, 
pkg_delete, and pkg_info. However when an install from source using make under 
pkgsrc is done, the pkg meta data always ends up in /var/db/pkg, the default 
location, unless it is overridden in /etc/mk.conf or set in the environment 
variable. If PKG_DBDIR is set to a non-default location, and you also do a 
build in pkgsrc, pkg_info can produce a different result than what the pkgsrc 
build & install machinery sees.

For acceptable licenses warning message says that it should be set in 
pkg_install.conf or mk.conf (I don't know whether it would actually works). 
Since 'make install' performs very similar action as pkg_add, PKG_DBDIR from 
pkg_install.conf should take effect. That is of course unless it is also set in 
mk.conf or in the environment variable, in which case it should be overriden. 
# # Save your current pkg_install.conf and mk.conf
# [ -f /etc/pkg_install.conf ] && (cd /etc && mv pkg_install.conf 
# [ -f /etc/mk.conf ] && (cd /etc/ && mv mk.conf mk.conf.orig)
# cd /usr/pkgsrc
# pkg-admin config-var PKG_DBDIR
# make -V PKG_DBDIR
# echo 'PKG_DBDIR=/usr/pkg/var/db/pkg' > /etc/pkg_install.conf
# pkg-admin config-var PKG_DBDIR
# make -V PKG_DBDIR
# # Wot??
# echo 'PKG_DBDIR=/usr/pkg/var/db/pkg' > /etc/mk.conf
# make -V PKG_DBDIR
# # Hmmm, okay, it's either a bug or a documentation problem, or pebkac.
# # Restore your original pkg_install.conf and  mk.conf
Set PKG_DBDIR in /etc/mk.conf (for NetBSD) or in ${PREFIX}/etc/mk.conf, where 
PREFIX is defaulted to /usr/pkg on other platforms. Or export it as as 
environment variable.

IMHO, the fix is to also somehow consult pkg_install.conf in the pkgsrc make 

Home | Main Index | Thread Index | Old Index