[Yum] Repoquery silently ignores unsatisfied dependencies

Satoshi Yagi marseille07 at hotmail.com
Fri Jul 10 17:32:43 UTC 2015


James,

Thanks for your response.

In my scenario, actually installing the package is overkill since I want to know the installability of a package beforehand.  Repoclosure also solves a different problem, in that I care less about some stray package someone uploaded that's not installable, so long as the ones I care about are installable.

One obvious solution I found so far is to run:

repoquery --requires

then for each capability, do --whatprovides and see if anything comes up.

Satoshi

> To: yum at lists.baseurl.org
> From: james-yum at and.org
> Date: Fri, 10 Jul 2015 12:22:15 -0400
> Subject: Re: [Yum] Repoquery silently ignores unsatisfied dependencies
> 
> 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
> _______________________________________________
> Yum mailing list
> Yum at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum/attachments/20150710/adcf6f59/attachment.html>


More information about the Yum mailing list