Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1303311 - [weakdeps] --whatsupplements not working
Summary: [weakdeps] --whatsupplements not working
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1326095 (view as bug list)
Depends On:
Blocks: 1314406
TreeView+ depends on / blocked
 
Reported: 2016-01-30 16:35 UTC by Parag Nemade
Modified: 2017-03-15 09:04 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-15 09:04:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Parag Nemade 2016-01-30 16:35:21 UTC
Description of problem:
Please enable copr repository "sudo dnf enable pnemade/weakdeps".
Then I can use following
$ sudo dnf repoquery --whatsupplements man-pages
Last metadata expiration check performed 3:46:26 ago on Sat Jan 30 15:59:27 2016.
man-pages-cs-0:0.18.20090209-20.fc23.noarch
man-pages-de-0:1.9-3.fc23.noarch
man-pages-es-0:1.55-24.fc23.noarch
man-pages-fr-0:3.70-3.fc23.noarch
man-pages-it-0:3.56-5.fc23.noarch
man-pages-ja-0:20151215-2.fc23.noarch
man-pages-ko-2:20050219-28.fc23.noarch
man-pages-pl-1:0.6-3.fc23.noarch
man-pages-ru-0:3.81-2.20151031.fc23.noarch
man-pages-zh-CN-0:1.5.2-10.fc23.noarch

but now I need whatsupplements any language using
$ sudo dnf repoquery --whatsupplements langpacks-ja
Last metadata expiration check performed 3:47:41 ago on Sat Jan 30 15:59:27 2016.

==> No output

But I have packages that Supplements langpacks-ja. See
$ sudo dnf repoquery --supplements man-pages-ja
Last metadata expiration check performed 0:02:05 ago on Sat Jan 30 19:54:47 2016.
man-pages & langpacks-ja


Version-Release number of selected component (if applicable):
dnf-plugins-core-0.1.16-1.fc23.noarch
dnf-1.1.6-1.fc23.noarch

Basically I want to find what packages supplements langpacks-ja.

Comment 1 Parag Nemade 2016-02-01 07:36:14 UTC
I have few things to add here.

1) I wrote "Supplements: man-pages and langpacks-ja" in man-pages-ja.spec file. Is there any issue with "and" in it? I mean I can --whatsupplements for "man-pages" but I can't get result for "langpacks-ja".

2) Why is it that when I wrote ""Supplements: man-pages and langpacks-ja" in man-pages-ja.spec but dnf repoquery --supplements for man-pages returning "man-pages & langpacks-ja"?
Please note here, I used "and" in spec file and repoquery returned "&" in result.

Should there be some consistency of usage of "and" and "&"?

Comment 2 Honza Silhan 2016-02-01 13:41:23 UTC
1) there's probably a bug in repoquery
2) rpm (and so dnf) prints `&` instead of "and". we should make it consistent.

Comment 3 Florian Festi 2016-02-02 10:44:39 UTC
Hmm, there was a bug in rpmbuild that can cause this. Can you please rebuild the package with a current version of rpm and check if the issue goes away?

You can just check the resulting package with rpm -qp --supplements

Comment 4 Parag Nemade 2016-02-02 13:03:24 UTC
I don't think I am seeing any difference in output. 
With command "rpm -q --supplements man-pages-ja", I previously got
==> man-pages and langpacks-ja
and after rebuild of man-pages-ja, I am again getting same output
==> man-pages and langpacks-ja

My question was either one should follow same. I think if rpm is using "and" string operator then dnf repoquery should also show "and" instead of "&".

Comment 5 Mike FABIAN 2016-02-02 13:17:12 UTC
(In reply to Florian Festi from comment #3)
> Hmm, there was a bug in rpmbuild that can cause this. Can you please rebuild
> the package with a current version of rpm and check if the issue goes away?
> 
> You can just check the resulting package with rpm -qp --supplements

I think this is not the reason because “rpm  -q supplements” (or -qp on the package file)
shows the correct results:

[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ rpm -q --supplements man-pages-de
(man-pages and langpacks-de)
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ rpm -q --supplements glibc-langpack-de
(glibc = 2.22.90-52.fc23 and (langpacks-de))
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ rpm -q --supplements langpacks-de
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$

This looks OK.

And “dnf repoquery --supplements” seems to work fine as well:

[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ sudo dnf repoquery --supplements man-pages-de
Last metadata expiration check performed 0:46:55 ago on Tue Feb  2 13:15:05 2016.
man-pages & langpacks-de
man-pages & langpacks-zh-CN
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ sudo dnf repoquery --supplements glibc-langpack-de
Last metadata expiration check performed 0:47:02 ago on Tue Feb  2 13:15:05 2016.
glibc = 2.22.90-50.fc23 & langpacks-de
glibc = 2.22.90-52.fc23 & langpacks-de
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ 

But “--whatsupplements” does not seem to work, neither using dnf nor rpm:

[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ sudo dnf repoquery --whatsupplements langpacks-de
Last metadata expiration check performed 0:47:08 ago on Tue Feb  2 13:15:05 2016.
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ 

[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ rpm -q --whatsupplements langpacks-de
no package supplements langpacks-de
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$

Comment 6 Jan Kurik 2016-02-24 14:22:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 7 Parag Nemade 2016-03-30 08:45:20 UTC
ping any update here?

Comment 8 Honza Silhan 2016-03-30 12:14:11 UTC
(In reply to Mike FABIAN from comment #5)
> But “--whatsupplements” does not seem to work, neither using dnf nor rpm:
> 
> [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ sudo dnf repoquery
> --whatsupplements langpacks-de

I am not sure whether it should match just part of rich dependency relation
Although it should work at least for whole expression inside tag:

# dnf repoquery --whatsupplements "(glibc = 2.23.1-5.fc24 and (langpacks-de or langpacks-de_AT or langpacks-de_BE or langpacks-de_CH or langpacks-de_DE or langpacks-de_LU))" --releasever=24

and

# sudo dnf repoquery --whatsupplements \*langpacks-de\* --releasever=24

which does not work currently.

BTW this does not work with current representation of boolean operands too (should not work anyway):
# dnf repoquery --whatsupplements "(glibc = 2.23.1-5.fc24 & (langpacks-de | langpacks-de_AT | langpacks-de_BE | langpacks-de_CH | langpacks-de_DE | langpacks-de_LU))" --releasever=24



'&', '|' and '<-' seems to be representation of operands in libsolv. We shoul be doing the conversion to 'and', 'or' and 'if' respectively in hawkey/libhif.

We'll fix it.

Comment 9 Michael Schröder 2016-04-07 10:58:18 UTC
No, the representation should be fixed in libsolv. Please don't add conversion code to hawkey.

Comment 10 Michael Schröder 2016-04-08 12:50:13 UTC
Commit 79ec99e586fade65d2cbf0bb2cb4008ac7ec9634 makes libsolv use rpm-style complex dependencies in its output.

Comment 11 Parag Nemade 2016-04-12 03:13:50 UTC
*** Bug 1326095 has been marked as a duplicate of this bug. ***

Comment 12 Parag Nemade 2016-04-12 03:27:58 UTC
I have libsolv-0.6.20 installed on F24 machine and I can see this bug is fixed now.

See $ sudo dnf repoquery --whatsupplements langpacks-ja
Last metadata expiration check: 0:12:50 ago on Tue Apr 12 08:37:39 2016.
calligra-l10n-ja-0:2.9.11-2.fc24.noarch
eclipse-nls-ja-0:4.5.0.v20150804081228-3.fc24.noarch
gimp-help-ja-0:2.8.2-5.fc24.noarch
glibc-langpack-ja-0:2.23.1-5.fc24.x86_64
kde-l10n-ja-0:15.12.3-3.fc24.noarch
libreoffice-langpack-ja-1:5.1.2.1-3.fc24.x86_64
man-pages-ja-0:20151215-3.fc24.noarch
nqc-doc-ja-0:3.1.7-18.fc24.x86_64
tesseract-langpack-jpn-0:3.04.01-1.fc24.noarch
tkgate-ja-0:2.0-24.beta10.fc24.noarch

and then both of these outputs are also consistent in using "and"
[parag@f24 master]$ rpm -q --supplements man-pages-ja
(man-pages and langpacks-ja)
[parag@f24 master]$ sudo dnf repoquery --supplements man-pages-ja
(man-pages and langpacks-ja)


Now next set of queries like
1) Do people need to use this kind of query
sudo dnf repoquery --whatsupplements \*langpacks-de\*
instead of
sudo dnf repoquery --whatsupplements langpacks-de

==> The previous still does not work but later works fine now. So glob is not working..

2) if following query is valid to run then its still not working
dnf repoquery --whatsupplements "(glibc = 2.23.1-5.fc24 & (langpacks-de | langpacks-de_AT | langpacks-de_BE | langpacks-de_CH | langpacks-de_DE | langpacks-de_LU))"

Comment 13 Michael Mráka 2016-04-12 12:08:54 UTC
Partially (support for globs in --what<weak_dep>) fixed in
https://github.com/rpm-software-management/dnf-plugins-core/pull/157

It still does not return answer for complex rich deps.

Comment 14 Fedora Update System 2016-05-19 11:07:45 UTC
dnf-plugins-core-0.1.21-1.fc24 dnf-1.1.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1efd7bc386

Comment 15 Fedora Update System 2016-05-21 01:32:48 UTC
dnf-1.1.9-1.fc24, dnf-plugins-core-0.1.21-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1efd7bc386

Comment 16 Fedora Admin XMLRPC Client 2016-07-08 09:26:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 17 Parag Nemade 2017-03-15 09:04:10 UTC
This bug is fixed for me already. If anything comes, I will report new bug. Thanks.


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