[Yum] Repoquery silently ignores unsatisfied dependencies

James Antill james-yum at and.org
Fri Jul 10 16:22:15 UTC 2015


Satoshi Yagi <marseille07 at hotmail.com> writes:

> I hope this is the right forum for repoquery, as I believe it is part of yum-utils package.
>
> I have an RPM in my repo that requires a non-existent package (i.e. broken dependency chain).
>
> $ repoquery --requires mypackage
> nonexistent_package > 3.0
> this_package_exists > 1.0
>
> Yum correctly identifies this as a problem upon installation:
>
> $ sudo yum -y install mypackage
> # output omitted for brevity
> --> Missing Dependency: nonexistent_package > 3.0 is needed by package mypackage-0.0.1-2.el5.x86_64 (reponame)
> Error: Missing Dependency: nonexistent_package > 3.0 is needed by package mypackage-0.0.1-2.el5.x86_64 (reponame)
>
> Yum deplist works as far as detecting the issue:
>
> $ yum deplist mypackage
> Finding dependencies:
> package: mypackage.x86_64 0.0.1-2.el5
> dependency: nonexistent_package > 3.0
>   Unsatisfied dependency
> dependency: this_package_exists > 1.0
>   provider: this_package_exists.x86_64 1.4.6-480.el5
>
> However, when I try resolving on repoquery, it doesn't say anything about the nonexistent_package, and exit code is 0.
>
> $ repoquery --requires --resolve mypackage
> this_package_exists-0:1.1.0-394.el5.x86_64
> $ echo $?
> 0
>
> Searching for the provider of nonexistent_package comes up empty, obviously:
>
> $ repoquery --whatprovides nonexistent_package
> $ 
>
> Is there a way to have repoquery report on resolution failures? The current behavior is problematic because there is no way to tell when resolution failed; repoquery silently ignores capabilities that didn't resolve and only return what it could resolve, which means the result isn't trustworthy.

 Yeh, it's not intended to do that it's just an output modifier. If
you want to test that a package is installable then you want to do
something more like:

yum --releasever=/ --installroot=/tmp/blah --assumeno \
 install mypackage

...or the other way is to run repoclosure to make sure the entire
repo. works. In theory we could just print the requires if we can't
resolve it to anything, but I'm not sure that'd be useful to you or
anyone else.

-- 
James Antill -- james at and.org


More information about the Yum mailing list