Skip to content

[RFC] gathering information about a package Requires: #2416

Open
@fabbione

Description

@fabbione

Hi guys,

I am currently both learning python and Insights. In order to write a rule I need to be able to gather a given package Requires:.

I can see that we already collect a lot of rpm information via specs/default.py and perhaps it might be enough to extend the query format to include Requires. Another option might be to create a new parser for the specific task.

Being new to the project and python, I am seeking some guidance on how it's best to proceed.

Ideally the output from the parser or the extension would match (shell code):

for i in $(rpm -qR $package | awk '{print $1}' | grep -v rpmlib); do
    rpm -q --whatprovides "$i" --qf "%{NAME}\n"
done | sort -u

Thanks for the advice
Fabio

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions