pkgsrc-Users archive

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

Re: /var/db/pkg vs /usr/pkg/pkgdb, /usr/sbin/pkg* vs /usr/pkg/sbin/pkg* and default PATH



On Wed, Nov 25, 2020 at 5:37 PM Mayuresh <mayuresh%acm.org@localhost> wrote:
> The default .profile in /root puts /usr/sbin ahead of /usr/pkg/sbin
> export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
>
> When you run pkg_add manully it runs /usr/sbin/pkg_add and updates
> /var/db/pkg whereas if you install using pkgsrc it uses
> /usr/pkg/sbin/pkg_add and uses /usr/pkg/pkgdb

No. It only does this if you bootstrap and use bmake. Don't do that
(on NetBSD), or you will have the split-brain situation you speak of.
Instead, use "make package-install" or the like, and it will do the
right thing.

In addition, the pkgsrc-specific settings (PKG_DEVELOPER and whatnot)
should go into /etc/mk.conf in this situation.


> Shouldn't the defaults be such that such confusion is avoided.

But they are. The default is not to bootstrap.

-- 
Benny


Home | Main Index | Thread Index | Old Index