When I build an rpm package with the same name as a package that already exists in a repo and type the command

$ dnf info package

This command only shows information about the built package. I would like to be able to run above command and dnf builddep package, and be able to choose which package I get information from.

Is there a way to differentiate between repo and self built packages without giving them different names?

Addendum: Built packages have newer versions


Look at the lines Repo and From repo in the dnf info output. These will tell you:

  • Repo tells you the repository that an available package is in. If the package is installed then it will tell you @System.
  • From repo appears only for installed packages. It gives the repository from which an installed package originated. It shows a repo name (e.g. fedora or updates) or @commandline for a manually installed RPM.

dnf builddep will install build dependencies for the latest version of the named package in the repositories. It doesn't do anything with manually installed RPMs.

  • Ahh I see now, but how would I differentiate packages when using dnf builddep package? If I have two packages with the same name, will it not just return results for one of them only? – MyWrathAcademia Jul 19 '18 at 19:43
  • @MyWrathAcademia If you've got two packages with the same name, they should be the same software (even if different versions). – Michael Hampton Jul 19 '18 at 19:50
  • @MyWrathAcademia And in any case, if you're rebuilding source RPMs and not using mock then you're doing it wrong. – Michael Hampton Jul 19 '18 at 20:00
  • I don't get @commandline for a package I installed using rpm -ivh. However, the rest is correct. I am using fpm, what can mock do that makes it necessary when building source RPM's? – MyWrathAcademia Jul 21 '18 at 19:08

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.