1

Let's say the SPEC file contains,

Requires: python >= 1.3, perl

Without forging a whole RPM, is there anyway to query the database for whether or not a a query like the following is satisfied by the system installs (without having to install further packages),

python >= 1.3, perl

Can I query the database for python >= 1.3, perl using base tools, or the underlying librpm?

I see I can query to see whether or not I have Python with,

$ rpm -q "python"
python-2.7.5-76.el7.x86_64

And likewise with perl, but is there anyway to to provide a query string and get back whether or not the dependencies are satisfied?

0

Off the shelf, no. However if you split on comma you can produce the version list of the software

rpm --qf '%{NAME}:%{VERSION}\n' -q -- perl
rpm --qf '%{NAME}:%{VERSION}\n' -q -- python

As I work more on this problem I plan on updating this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.