[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpm --install problems



On Wed, Dec 05, 2001 at 05:46:34PM +0100, Stefan Siegel wrote:
> Es schrieb Gordon Stewart:
> > I have installed webmin-0-92 RPM using the command: rpm --install
> > webmin-0-92,  This worked fine, but when I query the database by rpm -q
> > webmin* there are no entrys.  When I try and remove it, it tells me that it
> > is not there.  How can I remove it to install webmin-0-93.  If i had
> > installed it by rpm -Uvh webmin-0-92 then I would be able to do: rpm -q
> > webmin* .  Why is this and can anyone tell me how to remove webmin-0-92?
> 
> You have to remove the asterisk. Wildcard signs are not allowed in rpm 
> queries. So "rpm -q webmin" should give you "webmin-0-92".
> a "rpm -e webmin" should remove the package.
> 

The above is perfectly correct, but let me supply a technical correction.

Wild cards, more technically, regex's and/or globs through fnmatch, are
permitted on the command line in rpm-4.0.3, try
	rpm -qa XFree*

I hasten to point out that I don't believe that this functionality
is going to be useful at all on the rpm CLI. The arguments to rpm -qa
are package names, not files, so the regex/glob expressions are applied
to database keys, not files on path, and there is little reason to
believe that I can "fake" a file system onto a database retrieval key
through regex/glob sufficiently well to have implemented useful and/or
intuitive functionality.

The intended use for the implementation is in the rpmlib API, as it's now
possible to use a database iterator with a complex, multitag query match,
using either regex's or globs/fnmatch, to filter the headers retrieved
based on tag content.

This may someday work it's way into --queryformat syntax, but I still
don't believe that I'm ever gonna be able to document that suffciently
well to make even that useful, as --queryformat seems to be a big mystery
to most people I talk to.

If the above doesn't make sense, don't worry, be happy, and continue using
	rpm -qa | grep 'XFree*'
which is the Right Answer for the rpm CLI.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []