tech-pkg archive

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

Re: Time to change defaults for PKG_DBDIR



"Tom Spindler (moof)" <dogcow%babymeat.com@localhost> writes:

>> 2) Adjust platform/NetBSD.mk warning:
>> New warning text:
>>   ERROR: PKG_DBDIR is not explicitly set in /etc/mk.conf
>>   and /var/db/pkg exists.  See
>>   http://pkgsrc.org/pkgdb-change/#set-PKG_DBDIR for instructions.
>
> The main caveat I have with this is that - according to the
> instructions, at least - this may not be sufficient, as PKG_DBDIR
> needs to be set in three different places (/etc/mk.conf,
> /etc/pkg_install.conf, and /usr/pkg/etc/pkg_install.conf - although
> presumably that should technically be a relative directory based
> on where the currently invoked pkg_install is located... unless that's
> actually a fourth file location if /usr/pkg/etc/pkg_install.conf needs 
> to exist even if that hierarchy ain't in use?)

The built pkg_install will have the step 1 warning.  This warning is
about building a package from source.

If one sets PKG_DBDIR into base pkg_install and rebuilds and installs
it, and has a matching PKG_DBDIR in mk.conf and builds/installs (or
removes) pkg pkg_install, things should be ok.  The problem is using
pkg_install built with one setting on a system with a different setting.
Hence "no official builds should have non-default settings".

pkgsrc doesn't really use relative dirs; paths are baked in based
on LOCALBASE.  So it's

mk.conf (whereever that is)
/etc/pkg_install.conf (base SYSCONFDIR)
$LOCALBASE/etc/pkg_install.conf (PKG_SYSCONFDIR)

and the third will change based on how pkgsrc is bootstrapped.

But, at this point I think it is unwise for anyone to use any PKG_DBDIR
other than the default, even if it means migrating their system.  With
the possible exception of /opt/pkg/.pkgdb for people that have been
using joyent builds -- as long as they have installed the mk.conf
setting that and stay consistent in that world.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index