Bug 3971 - urpmq --whatrequires doesn't work with virtual provides
Summary: urpmq --whatrequires doesn't work with virtual provides
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: i586 Linux
Priority: Normal minor
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2011-12-31 19:19 CET by David Walser
Modified: 2012-10-08 22:09 CEST (History)
2 users (show)

See Also:
Source RPM: urpmi-6.40-9.mga1.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2011-12-31 19:19:03 CET
For example, the tomcat5-jasper package provides jasper5.

"urpmq --whatrequires jasper5" gives "No package named jasper5"
Comment 1 Manuel Hiebel 2012-01-01 00:46:46 CET
Hi, thanks for reporting this bug.
Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

Keywords: (none) => Triaged
Assignee: bugsquad => thierry.vignaud

Thierry Vignaud 2012-01-06 19:04:23 CET

Severity: normal => minor

Comment 2 Jeff Johnson 2012-01-07 20:38:30 CET
tracked at https://bugs.launchpad.net/rpm/+bug/913248

CC: (none) => n3npq

Comment 3 Thierry Vignaud 2012-10-08 17:48:12 CEST
"urpmq --whatprovides" != "urpmq --whatrequires"

Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 4 David Walser 2012-10-08 17:51:45 CEST
Which makes for a logical imbalance.

Status: RESOLVED => REOPENED
Resolution: INVALID => (none)

Comment 5 David Walser 2012-10-08 17:52:53 CEST
I don't know how easy it would be to fix, but there are valid reasons for wanting to make this sort of query.

Granted, it is nice that you can use the package name and get any packages that require it either directly or through one of its provides, but still it would be nice to fix this if possible.
Comment 6 Thierry Vignaud 2012-10-08 21:05:02 CEST
I don't understand what you want to fix.
"urpmq --whatprovides foobar" nicely returns all the packages providing foobar
"urpmq --whatrequires foobar" nicely returns all the packages providing foobar
(nothing for jasper5)

If you don't believe me, just look at the raw synthesis, nothing requires jasper5. Period.

This works nicely for eg: coreutils

Status: REOPENED => RESOLVED
Resolution: (none) => INVALID

Comment 7 Luc Menut 2012-10-08 21:53:44 CEST
Thierry, I confirm that "urpmq --whatrequires" with virtual provides doesn't give the result that we might expect.

coreutils isn't a good example here, because it's a package name.

Could you try with jre or java.
e.g. in mga2:
LC_ALL=C urpmq --whatprovides jre
java-1.5.0-gcj|java-1.7.0-openjdk|java-1.6.0-openjdk

LC_ALL=C urpmq --whatrequires jre
No package named jre
The following packages contain jre: jrefactory, jrefactory-javadoc, jrexx, jrexx-javadoc, ...
You should use "-a" to use all of them

but if I use rpm on my local mirror:
rpm -qp --queryformat '[%{NAME}-%{VERSION}   %{REQUIRES}\n]' *.rpm |grep " jre$"
esmska-1.2.0   jre
fmj-20110107   jre
libreoffice-java-common-3.5.3.2   jre

CC: (none) => lmenut

Comment 8 Thierry Vignaud 2012-10-08 22:09:35 CEST
man urpmq => "urpmq --whatrequires -p jre"

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