Bug 1048280 - The 'repoquery' utility dependency resolution sometimes displays different results than yum
Summary: The 'repoquery' utility dependency resolution sometimes displays different re...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-03 15:23 UTC by Jon McKenzie
Modified: 2014-03-26 09:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-26 09:50:28 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jon McKenzie 2014-01-03 15:23:11 UTC
Description of problem:

The 'repoquery' utility dependency resolution sometimes displays different results than yum


Version-Release number of selected component (if applicable):

yum-utils-1.1.30-14


How reproducible:

Very


Steps to Reproduce:
1. Use the 'ant' package as the test case. First, ensure the 'ant' package is not installed:

# rpm -q ant
package ant is not installed

2. Query the dependencies of 'ant' using repoquery (first wiping yum cache to ensure a consistent baseline):

# yum clean all
Loaded plugins: fastestmirror, priorities
Cleaning repos: centos6-server-x86_64
Cleaning up Everything
Cleaning up list of fastest mirrors
# repoquery --requires --resolve ant
ant-0:1.7.1-13.el6.x86_64
glibc-0:2.12-1.132.el6.i686
bash-0:4.1.2-15.el6_4.x86_64
java-1.6.0-openjdk-devel-1:1.6.0.0-1.66.1.13.0.el6.x86_64
xml-commons-apis-0:1.3.04-3.6.el6.x86_64
libgcc-0:4.4.7-4.el6.x86_64
jpackage-utils-0:1.7.5-3.12.el6.noarch
ant-0:1.7.1-13.el6.x86_64
libgcj-0:4.4.7-4.el6.x86_64
zlib-0:1.2.3-29.el6.x86_64
xerces-j2-0:2.7.1-12.6.el6_0.x86_64
glibc-0:2.12-1.132.el6.x86_64
java-1.5.0-gcj-devel-0:1.5.0.0-29.1.el6.x86_64

3. Attempt to install 'ant' via yum. Notice in the output below that "java-1.5.0-gcj-devel" does not appear as a dependency (even though it appears as a dependency via repoquery):

# yum install ant
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ant.x86_64 0:1.7.1-13.el6 will be installed
--> Processing Dependency: java-devel >= 1.5.0 for package: ant-1.7.1-13.el6.x86_64
--> Processing Dependency: xml-commons-jaxp-1.3-apis for package: ant-1.7.1-13.el6.x86_64
--> Processing Dependency: xerces-j2 for package: ant-1.7.1-13.el6.x86_64
--> Running transaction check
---> Package java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-1.66.1.13.0.el6 will be installed
--> Processing Dependency: java-1.6.0-openjdk = 1:1.6.0.0-1.66.1.13.0.el6 for package: 1:java-1.6.0-openjdk-devel-1.6.0.0-1.66.1.13.0.el6.x86_64
---> Package xerces-j2.x86_64 0:2.7.1-12.6.el6_0 will be installed
--> Processing Dependency: xml-commons-resolver >= 1.1 for package: xerces-j2-2.7.1-12.6.el6_0.x86_64
--> Processing Dependency: java-gcj >= 1.5.0 for package: xerces-j2-2.7.1-12.6.el6_0.x86_64
---> Package xml-commons-apis.x86_64 0:1.3.04-3.6.el6 will be installed
--> Running transaction check
---> Package java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6 will be installed
--> Processing Dependency: sinjdoc for package: java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.66.1.13.0.el6 will be installed
---> Package xml-commons-resolver.x86_64 0:1.1-4.18.el6 will be installed
--> Running transaction check
---> Package sinjdoc.x86_64 0:0.5-9.1.el6 will be installed
--> Processing Dependency: java_cup >= 0.10 for package: sinjdoc-0.5-9.1.el6.x86_64
--> Running transaction check
---> Package java_cup.x86_64 1:0.10k-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================
 Package                         Arch          Version                           Repository                    Size
====================================================================================================================
Installing:
 ant                             x86_64        1.7.1-13.el6                      centos6-server-x86_64        2.5 M
Installing for dependencies:
 java-1.5.0-gcj                  x86_64        1.5.0.0-29.1.el6                  centos6-server-x86_64        139 k
 java-1.6.0-openjdk              x86_64        1:1.6.0.0-1.66.1.13.0.el6         centos6-server-x86_64         41 M
 java-1.6.0-openjdk-devel        x86_64        1:1.6.0.0-1.66.1.13.0.el6         centos6-server-x86_64         15 M
 java_cup                        x86_64        1:0.10k-5.el6                     centos6-server-x86_64        197 k
 sinjdoc                         x86_64        0.5-9.1.el6                       centos6-server-x86_64        705 k
 xerces-j2                       x86_64        2.7.1-12.6.el6_0                  centos6-server-x86_64        2.9 M
 xml-commons-apis                x86_64        1.3.04-3.6.el6                    centos6-server-x86_64        439 k
 xml-commons-resolver            x86_64        1.1-4.18.el6                      centos6-server-x86_64        145 k

Transaction Summary
====================================================================================================================
Install       9 Package(s)

Total download size: 62 M
Installed size: 116 M
Is this ok [y/N]: 

4. Validate that java-1.5.0-gcj-devel-0:1.5.0.0-29.1.el6.x86_64 isn't already installed (thus fulfilling the "dependency"):

# rpm -q java-1.5.0-gcj-devel
package java-1.5.0-gcj-devel is not installed

Actual results:

Querying through 'repoquery' displays some different dependencies than through 'yum'

Expected results:

Querying through 'repoquery' displays the same dependencies as the 'yum' command. Since yum and repoquery are both looking at the same repository and repodata, they should have the same information.

Comment 2 Valentina Mukhamedzhanova 2014-03-26 09:50:28 UTC
repoquery --requires --resolve does not do depsolving, it just resolves capabilities to originating packages. For example, pidgin requires /bin/sh:

$ repoquery --requires pidgin
/bin/sh

$ repoquery --requires --resolve pidgin
bash-0:4.2.45-4.fc20.x86_64


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