Bug 1325982 - rpm -q --whatsuggests not consistent with --whatrequires
Summary: rpm -q --whatsuggests not consistent with --whatrequires
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-11 14:08 UTC by Michael Mráka
Modified: 2016-04-14 12:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-14 12:24:23 UTC
Type: Bug


Attachments (Terms of Use)

Description Michael Mráka 2016-04-11 14:08:12 UTC
Description of problem:
Querying rich dependencies with
  rpm -q --whatsuggests XXX
shows different output than what it outputs with
  rpm -q  --whatrequires XXX
for similarly defined requires.
And similarly for other weak dependencies - Recommends, Supplements, Enhances.

Version-Release number of selected component (if applicable):
rpm-4.13.0-0.rc1.12.fc23.x86_64

How reproducible:
always

Steps to Reproduce:
1. build a package with rich dependencies both in requires and Suggests:
grep -E 'Requires:|Suggests:' richdep.spec
Requires: A
Requires: B
Requires: (C and D)
Requires: (E or F)
Requires: (G if H else I)
Suggests: AS
Suggests: BS
Suggests: (CS and DS)
Suggests: (ES or FS)
Suggests: (GS if HS else IS)

2. for i in A B C D E F G H I ; do echo -n "$i: " ; rpm -q --whatrequires $i ; done
3. for i in AS BS CS DS ES FS GS HS IS ; do echo -n $i: ; rpm -q --whatsuggests $i ; done

Actual results:
A: richdep-1-1.fc23.noarch
B: richdep-1-1.fc23.noarch
C: richdep-1-1.fc23.noarch
D: richdep-1-1.fc23.noarch
E: richdep-1-1.fc23.noarch
F: richdep-1-1.fc23.noarch
G: richdep-1-1.fc23.noarch
H: no package requires H
I: richdep-1-1.fc23.noarch

AS: richdep-1-1.fc23.noarch
BS: richdep-1-1.fc23.noarch
CS: no package suggests CS
DS: no package suggests DS
ES: no package suggests ES
FS: no package suggests FS
GS: no package suggests GS
HS: no package suggests HS
IS: no package suggests IS


Expected results:
AS: richdep-1-1.fc23.noarch
BS: richdep-1-1.fc23.noarch
CS: richdep-1-1.fc23.noarch
DS: richdep-1-1.fc23.noarch
ES: richdep-1-1.fc23.noarch
FS: richdep-1-1.fc23.noarch
GS: richdep-1-1.fc23.noarch
HS: no package suggests HS
IS: richdep-1-1.fc23.noarch

Additional info:
Note that  rpm -q --whatrequires H has been fixed to return "richdep" in newer rpm so should rpm -q --whatsuggests H do.

See thread on http://lists.rpm.org/pipermail/rpm-ecosystem/2016-April/000336.html

Comment 1 Ľuboš Kardoš 2016-04-14 12:24:23 UTC
Fixed in rawhide in rpm-4.13.0-0.rc1.30.fc25. You need to rebuild rpmddb for this change to take effect.


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