Subject: Re: pkgdb - testers wanted
To: Christoph Badura <bad@ora.de>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 01/13/1999 18:37:29
On Wed, 13 Jan 1999, Christoph Badura wrote:
> >% pkg_info -Fe /usr/X11R6/bin/pload
> >	=> Shows you which package the named file belongs to
> 
> >% pkg_info -F /usr/X11R6/bin/pload
> >	=> Get mode information on the package the named file belongs to
> 
> It would appear more normal to me if the default were to tell me what
> package a file belongs to.  Everything else can be worked out from that
> information.

You mean without the -F switch? That's not possible, as a perfectly valid
option instead of a (installed) package name is a binary pkg, and there
would be no way to find out if the given file's a file from a package, or
a binary pkg:

miyu% pkg_info /usr/pkgsrc/packages/1.3I/i386/All/xtermset-0.2.tgz 
Information for /usr/pkgsrc/packages/1.3I/i386/All/xtermset-0.2.tgz:

Comment:
Change things like foreground color, size etc. on an xterm
...


> Hmm, is the "file name" argument a regex to match in the pkgdb or will
> I lose that functionality?  If it were a regex "pkg_info -F" could be
> subsumed under "pkg_info -F .*".

Nope - dbopen() doesn't seem to provide such matching, or at least I don't
know enough about it to do that. Maybe if you construct the right
compare-function, this could be possible. 


> I would also prefer it if making a simple error wouldn't dump the whole pkgdb
> at me but gave a helpful message instead

Simple error like what?


 - Hubert

-- 
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>