2

How can I find out which packages have a build requirement on some package foo? I'm aware of the following command

dnf repoquery --alldeps --recursive --whatrequires foo

in order to query all packages which have a requirement on package foo. However, packages with a build requirement only are not listed there. How can I list such packages, too?

1

Build requirements aren't stored in the RPM metadata of a non-source RPM, so they would not be searchable by dnf. You'd have to look at the .spec file used to build the RPM to find the BuildRequires: tags.

  • Oh that is a good point, though, sad to hear ;-) in that case I have to manually query spec files. – Max Maier Aug 21 '19 at 16:22
0

While build requirements are indeed not stored in the final RPM (as jsbillings pointed out) dnf was improved over the last years so you can actually query build requirements now.

dnf repoquery --disablerepo=* --enablerepo=*-source --arch=src --whatrequires <provide>

Source: Examples in the DNF Command Reference (at the very end of that section)

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.