Bug 905697 - [rfe] [plugin] yum-builddep like functionality through dnf
Summary: [rfe] [plugin] yum-builddep like functionality through dnf
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-01-30 00:36 UTC by Rahul Sundaram
Modified: 2014-09-30 23:41 UTC (History)
9 users (show)

Fixed In Version: dnf-plugins-core-0.0.6-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-06-23 07:44:44 UTC

Attachments (Terms of Use)

Description Rahul Sundaram 2013-01-30 00:36:31 UTC
Description of problem:

subject says it all

Comment 1 Ales Kozumplik 2013-12-17 16:01:05 UTC
Radek please take a look at this. The original yum-builddep resides in yum-utils and so the 'dnf builddep' should be a plugin.

Comment 2 Alec Leamas 2014-01-04 20:10:44 UTC
Yes, yum-builddep is needed. That said, the semantics  are not that clear: there are subtle differences when operating on a package, a srpm or a spec file. Panu sorted this out somewhere on 2013 #fedora-devel archives...

Comment 3 Jean-François Fortin Tam 2014-01-04 22:08:51 UTC
For the record, one thing I would love to see for DNF's equivalent of yum-builddep is that it accepts multiple packages as arguments, and fetches the dependencies for the whole.

With YUM, you would get different results and had to run builddep for package you want, individually.

Comment 4 Ales Kozumplik 2014-02-13 09:26:16 UTC
Fixed upstream by 2d3dc76.

Comment 5 Parag Nemade 2014-02-15 15:57:00 UTC
from http://koji.fedoraproject.org/koji/rpminfo?rpmID=4793860 build, I see that 0.0.3 version is already built in koji but this build does not provided builddep.py plugin.

Comment 6 Fedora Update System 2014-02-25 15:47:33 UTC
dnf-plugins-core-0.0.4-1.fc20 has been submitted as an update for Fedora 20.

Comment 7 Michael Monreal 2014-02-25 20:22:25 UTC
[mimox ]$ rpm -q dnf-plugins-core
[mimox ]$ dnf builddep test
No such command: builddep. Please use /usr/bin/dnf --help

Still not working or do we need to enable the plugin somehow?

Comment 8 Parag Nemade 2014-02-26 03:10:49 UTC
The specfile missed the install command for builddep.py plugin. This package need to be built again with builddep.py installation.

Another observation, there are now 7 plugins (python files) available in upstream source archive but only 3 plugins are getting installed in the current spec file. Good to package all the plugins.

Comment 9 Fedora Update System 2014-02-26 08:54:34 UTC
dnf-plugins-core-0.0.5-1.fc20 has been submitted as an update for Fedora 20.

Comment 10 Ales Kozumplik 2014-02-26 09:05:16 UTC
(In reply to Parag from comment #8)
> The specfile missed the install command for builddep.py plugin. This package
> need to be built again with builddep.py installation.

Indeed, should be fine now: https://admin.fedoraproject.org/updates/dnf-plugins-core-0.0.5-1.fc20

Comment 11 Fedora Update System 2014-02-26 09:53:51 UTC
dnf-plugins-core-0.0.5-2.fc20 has been submitted as an update for Fedora 20.

Comment 12 Ales Kozumplik 2014-02-26 09:55:04 UTC
One more time: https://admin.fedoraproject.org/updates/dnf-plugins-core-0.0.5-2.fc20

The remaining files are missing out from the Fedora RPM on purpose.

Comment 13 Parag Nemade 2014-02-26 10:00:55 UTC
Thanks Ales.

Comment 14 Fedora Update System 2014-02-26 14:07:04 UTC
Package dnf-plugins-core-0.0.4-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.0.4-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2014-03-07 06:35:39 UTC
dnf-plugins-core-0.0.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2014-03-17 12:46:32 UTC
dnf-plugins-core-0.0.6-1.fc20 has been submitted as an update for Fedora 20.

Comment 17 Fedora Update System 2014-03-20 03:05:56 UTC
dnf-plugins-core-0.0.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Jean-François Fortin Tam 2014-06-15 01:38:26 UTC
I gave this a try today, by installing the dnf-plugins-core 0.8 package from F20, and then:

    # dnf builddep baobab
    Error : Failed to open: 'baobab', not a valid spec file.

That doesn't cut it. In YUM, you could just give it a package name and it would figure out the rest for you. We should expect the same level of quality from DNF: you should be able to say "dnf builddep baobab nautilus gnonlin" and have it automatically figure out all the build dependencies for all those packages.

Comment 19 Panu Matilainen 2014-06-16 07:36:31 UTC
The problem with "yum builddep foo" is that it is not reliable because of the way repositories are set up, it only really works for packages with no (arch-)conditional buildrequires and there are a *lot* of those around.

dnf builddep could of course technically do what yum builddep does, but the entirely repository based mode was left intentionally out, because its broken and unfixable.

Comment 20 Rahul Sundaram 2014-06-16 13:11:57 UTC
I don't particularly understand the rationale completely but if the differences are documented, that would help.  Thanks

Comment 21 Panu Matilainen 2014-06-17 05:08:44 UTC
Buildrequires can only be reliably be acquired by
a) parsing the spec
b) looking at requires of an src.rpm built on an identical system (same arch, same installed packages, same config etc)

Fedora's source repositories are not per arch, instead the src.rpm is picked from a more or less random arch during build. This means conditions for b) are not covered. Or rather, sometimes they are, sometimes they're not. In other words, unreliable.

So from dnf perspective the choice is between explaining why the yum-builddep repodata-only feature is not implemented and why builddep arbitrarily gets it wrong :)

What dnf builddep *could* do to automate this is automatically download the src.rpm and unpack the spec for parsing the buildreqs, but that's best left for rpm >= 4.12 where there is an api for accessing the package payload.

Comment 22 Ales Kozumplik 2014-06-23 07:44:44 UTC
Please see bug 1074585.

Note You need to log in before you can comment on or make changes to this bug.