Current-Users archive

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

Re: [HEADS UP] pkgsrc default database directory changed



On Wed, 2 Dec 2020, Valery Ushakov wrote:

On Wed, Dec 02, 2020 at 11:28:41 +0100, Thomas Klausner wrote:

There is one potential pitfall: you'll have to make sure
${PREFIX}/sbin/pkg_* is used and not mixed with /usr/sbin/pkg_* (which
will default to the old location until -current and the branches are
updated).

So please make sure your admin user's PATH has ${PREFIX}/sbin before
/usr/sbin, or copy the new pkg_install tools from ${PREFIX}/sbin to
/usr/sbin.

NetBSD daily cron job uses full paths.  They can be changed by adding

pkg_admin=/usr/pkg/sbin/pkg_admin
pkg_info=/usr/pkg/sbin/pkg_info

to /etc/pkgpath.conf

And Tobias Nygren replied:

> The new default for the pkgsrc database (which contains information
> about all installed packages) in pkgsrc-HEAD has changed from
> /var/db/pkg to ${PREFIX}/pkgdb (so usually /usr/pkg/pkgdb).

Since this is about changing a default, it should be mentioned in the
heads-up how to stay on the old path if migration is currently not
convenient. To do this one can add PKG_DBDIR=/var/db/pkg to mk.conf
before the new pkg_install is built.

If one adds tnn's suggested entry to /etc/mk.conf, is it also needed
to apply uwe's update to /etc/pkgpath.conf?


One additional series of questions:

* should anything be changed in postinstall(8) to at least check for
  the "correct" location?
* should postinstall(8) attempt to fix it? (probably no)
* should postinstall(8) "obey" the suggested changes to mk.conf and/or
  pkgpath.conf?


Finally, I looked, and my system doesn't have any file, anywhere
(other than in source trees) with the name ``pkg_install''.  Am I
missing something?  I've been running pkgsrc for ~forever without
any (apparent) issues.



+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index