On Sep 27, 2006, at 3:15 PM, R. Tyler Ballance wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sorry for prolonging this thread, but I wanted to tack on one more
question ;)
Is there a sort of wildcard for the rpm db functions to where I can
essentially query similar to an `rpm -qa` and list all the
installed packages.
Am I naive in thinking that "*" would work? :)
Well, its a database, and so has records and record boundaries which
need to be taken into account.
Meanwhile, there's some logic to filter on tag values. Try the following
rpm -qa a\*
rpm -qa 'arch=noarch'
rpm -qa '!arch=i*'
etc, etc ("arch" is a tag name, substitute any tag name displayed by
rpm --querytags, multiple items
are implicitly &&)
Note that the search is sequential through all headers and so dirt
slow. Adding --nodigest and --nosignature
will recover some of the speed back.
Note also that there are "optional" tags as well, that may or may not
exist, and so matching a value
that is not present is undefined and may not be to your expectations.
The matching "works" within the above caveats.
See <rpm/rpmdb.h> for the method to set from C after rpmdbInitIterator
() call, look for MIRE as in
Match Iterator Regular Expression.
73 de Jeff
Cheers,
- -R. Tyler Ballance
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFFGs3KqO6nEJfroRsRArV5AJ4sFgVrMnGJZHgfMXfa9Ze3tRZbXgCghllo
tZzZf80kOiGvB4B4DZnDSEU=
=PElf
-----END PGP SIGNATURE-----
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list