Bug 1589722 - Inaccurate results of `dnf repoquery --whatrequires`
Summary: Inaccurate results of `dnf repoquery --whatrequires`
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Blaha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-11 09:17 UTC by Milan Crha
Modified: 2018-06-14 06:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-14 06:43:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Milan Crha 2018-06-11 09:17:42 UTC
While trying to find out which packages require what, I do something like this:

   # dnf repoquery --whatrequires pkgconfig\(camel-1.2\) --alldeps

and that pkgconfig file is provided by evolution-data-server-devel, thus I also do:

   # dnf repoquery --whatrequires evolution-data-server-devel --alldeps

Both run on a rawhide machine with enabled rawhide repository:
metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch

and the first command returns:

   evolution-devel-0:3.29.2-1.fc29.i686
   evolution-devel-0:3.29.2-1.fc29.x86_64

and the second:

   evolution-devel-0:3.29.2-1.fc29.i686
   evolution-devel-0:3.29.2-1.fc29.x86_64
   folks-devel-1:0.11.4-5.fc28.i686
   folks-devel-1:0.11.4-5.fc28.x86_64
   maya-calendar-devel-0:0.4.1-5.fc29.i686
   maya-calendar-devel-0:0.4.1-5.fc29.x86_64

But this information is incomplete, because for example evolution-ews package explicitly

   BuildRequires: pkgconfig(camel-1.2) >= %{eds_evo_version}

but it's not in any of the lists.

I expect to:
a) get complete list of packages which require the package I pass to the command
b) it is nice to explicitly ask for the pkgconfig dependency, but as long as that pkgconfig file is provided by evolution-data-server-devel, then I'd like to see packages returned with pkgconfig() dependency in the list of packages returned with the -devel package dependency (which may or may not work already; it seems it does work from the above, but I rather mention it here to not have it broken after changes for a).)

Comment 1 Milan Crha 2018-06-11 09:19:23 UTC
I forgot to mention, I've installed:

dnf-yum-2.7.5-16.fc29.noarch
dnf-data-2.7.5-16.fc29.noarch
dnf-plugins-core-2.1.5-4.fc28.noarch
libdnf-0.11.1-5.fc29.x86_64
python2-dnf-2.7.5-16.fc29.noarch
dnf-2.7.5-16.fc29.noarch
python3-dnf-plugins-core-2.1.5-4.fc28.noarch
python3-dnf-2.7.5-16.fc29.noarch

Comment 2 Marek Blaha 2018-06-12 10:47:15 UTC
There is RFE for similar functionality here:
https://bugzilla.redhat.com/show_bug.cgi?id=1361617

As a workaround, you can try advice from comments on that bug:

$ dnf repoquery --whatrequires evolution-data-server-devel --alldeps --enablerepo=rawhide-source

Basically when you are looking for build time dependencies, you need to use the source packages, not the binary ones.

Does this help you?

Comment 3 Milan Crha 2018-06-12 11:33:29 UTC
Aha, interesting. It still doesn't cover everything (note pkgconfig(camel-1.2) is provided by evolution-data-server-devel):

# dnf repoquery --whatrequires evolution-data-server-devel --alldeps --disablerepo=* --enablerepo=rawhide-source
ekiga-0:4.0.1-40.fc28.src
evolution-rss-1:0.3.95-17.fc28.src
ffgtk-0:0.8.6-25.fc28.src
folks-1:0.11.4-5.fc28.src
glabels-0:3.4.0-9.fc28.src
gnome-phone-manager-0:0.69-24.fc28.src
gnome-shell-0:3.29.2-1.fc29.src
libopensync-plugin-evolution2-1:0.22-61.fc28.src
sflphone-0:1.4.1-31.fc28.src
syncevolution-1:1.5.3-4.fc28.src

# dnf repoquery --whatrequires pkgconfig\(camel-1.2\) --alldeps --disablerepo=* --enablerepo=rawhide-source
evolution-0:3.29.2-1.fc29.src
evolution-ews-0:3.29.2-1.fc29.src
evolution-mapi-0:3.29.2-1.fc29.src

Comment 4 Marek Blaha 2018-06-13 07:21:22 UTC
I'm not sure if I got your question well - are you missing evolution-devel in output of later command? That's because you enabled ONLY rawhide-source repo. Just omit --disablerepo=* attribute:

On my machine (I'm on F28, not rawhide):

$ dnf repoquery --whatrequires pkgconfig\(camel-1.2\) --alldeps --enablerepo=fedora-source
evolution-0:3.28.1-2.fc28.src
evolution-devel-0:3.28.1-2.fc28.i686
evolution-devel-0:3.28.1-2.fc28.x86_64
evolution-devel-0:3.28.2-1.fc28.i686
evolution-devel-0:3.28.2-1.fc28.x86_64
evolution-ews-0:3.28.1-1.fc28.src
evolution-mapi-0:3.28.1-1.fc28.src

Comment 5 Milan Crha 2018-06-13 07:39:19 UTC
I'm thinking of indirect dependencies.

In this particular case, the pkgconfig(camel-1.2) is provided by evolution-data-server-devel package, thus when I ask for the list of packages which require evolution-data-server-devel, then I should get those which need it directly, but also those which need it indirectly, like those which reference it through the pkgconfig() notation.

Whether asking for a pkgconfig() dependency should work the same (first to resolve which -devel package provides it, then get list of all packages which require that -devel package) is a question. I'd say probably no, but I do not know. Both ways have its pros and cons.

Comment 6 Marek Blaha 2018-06-13 09:54:18 UTC
Oh, I see. What you want is basically what --alldeps switch is supposed to do (btw this switch is on by default, so can be omitted).

The problem is, that dnf is not able to get list of provides for the evolution-data-server-devel, because you have enabled only rawhide-source repo (in source repo, there is only evolution-data-server package from which -devel was built). So dnf can only search packages which reference evolution-data-server-devel directly.

The solution is to not disable all repos other then the source one:
$ dnf repoquery --whatrequires evolution-data-server-devel --enablerepo=rawhide-source

Comment 7 Milan Crha 2018-06-13 11:44:33 UTC
Aha. It's a bit confusing, but I think it also makes sense. It seems the problem was on my side after all, not giving dnf all the package information. Am I right? Feel free to close this if I am.


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