tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [HEADS UP] pkgsrc default database directory changed
Date: Wed, 09 Dec 2020 12:12:11 -0500
From: Greg Troxel <gdt%lexort.com@localhost>
Message-ID: <rmi4kkuq4yc.fsf%s1.lexort.com@localhost>
| For me, the easiest solution is to symlink from /var/db/pkg to
| /usr/pkg/pkgdb (and refcount). Then the old tools work fine if called
| by accident.
In general, I agree, and I used to do it that way (I've had the db
moved for years) except that having
PKG_DBDIR=/usr/pkg/db
in /etc/pkg_install.conf is even simpler (nb: that is what I use, the actual
new path should be wherever it is moved to), and avoids having ugly symlinks
in /var - which in turn trains the admin not to "cd /var/db/pkgdb" (etc) any
more.
That one line handles both pkgdb and pkgdb.refcount as the latter is
just ${PKG_DBDIR}.refcount.
All that was ever needed to be done to move pkgdb was to actually move the
directory (and file) and add this (for almost everyone, new) one line file.
It could have been all so so simple.
Incidentally, it would be even nicer if the refcount file were defined
as ${PKG_DBDIR}/refcount so this file would live in the pkgsrc database,
rather than being external to it. It cannot conflict with anything else
in PKG_DBDIR as everything (else) there is pkgname-version - and while
the pkgname and version strings can be all kinds of weird stuff, the one
thing that never changes is the presence of that minus (or hyphen, or dash,
however you think of it) -- it is always present, and "refcount" has no
hyphen. It also isn't a directory.
Note that this one I haven't tested, and it is possible that some of the
pkg_install tools would need minor adjustments to deal with that (perhaps
pkg_admin or pkg_info or ...)
kre
Home |
Main Index |
Thread Index |
Old Index