tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: How do I discover the default PKG_DBDIR ?
On Sun, Aug 30, 2009 at 02:22:14PM +0200, Joerg Sonnenberger wrote:
> On Sun, Aug 30, 2009 at 07:08:52PM +0700, Robert Elz wrote:
> > If there's no current way to extract this info, could one perhaps be
> > added in the next version of the pkg tools?
>
> I don't see why it should be added. This is a pretty internal part of
> the package tools you should not mess with, so unless given a good
> reason I don't see why it should be exposed.
Up to a point, Lord Copper.
I think it's perfectly natural to want to find out what the database
directory is. The difference is that PKG_DBDIR, as opposed to most
other variables, is a special kind of setting.
For other variables, if using pkgsrc, then
${MAKE} show-var VARNAME=whatever
will give the value, as used in various of the pkgtools packages. For
binary packages,
pkg_info -Q varname pkgname
should provide the info, where known. e.g.
% pkg_info -Q PKG_SYSCONFDIR boehm-gc
/usr/pkg/etc
%
same for LOCALBASE, etc. But note, however, that PKG_DBDIR is not one of
those variables.
That's because the binary package tools will use their own idea of
PKG_DBDIR when adding a binary package. So PKG_DBDIR will take the
value from the current environment, or fall back to the default. So
it's not really up to the packaging tools to tell you what PKG_DBDIR
is, it's for the user to tell pkg_add what it is.
> > [Aside: if a method to do this gets added, rather than already there
> > and I just cannot find it, I wouldn't object if it also made available
> > the current values of other pkg related config vars - LOCALBASE,
> > PKG_SYSCONFDIR, anything else like that - those I can dig out without extra
> > support, but it would be easier if there was a simpler way than currently.]
>
> pkg_install has no concept of LOCALBASE, PKG_SYSCONFDIR etc.
Yes, see pkg_info -Q varname above.
> > [Random gripe: man pages which state things as facts, which are actually
> > config options are horrid - even if the config option changing also causes
> > the man page to alter - from the man page I'd like to be able to discover
> > what I can actually assume to be true, not what just happens to be true
> > this week ... that is, in the above quoted paragraph, I'd much prefer
> > if the last line said something more like:
> > otherwise it defaults to a system dependent database
> > directory, which is /var/db/pkg for this installation.
>
> This is IMO just harder to read for something that should be altered
> only if you really know what you are doing.
Up to a point, Lord Copper.
I don't think there's anyone who thinks that the manual page, and other
documentation, could not be improved greatly.
Regards,
Alistair
Home |
Main Index |
Thread Index |
Old Index