Re: Repoquery silently ignores unsatisfied dependencies

Satoshi Yagi <[email protected]> Fri, 10 Jul 2015 10:32:43 -0700
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
--===============1039789190583125841==
Content-Type: multipart/alternative;
	boundary="_08f644c0-98ff-4bec-b9d6-04a603cdf64d_"

--_08f644c0-98ff-4bec-b9d6-04a603cdf64d_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

James=2C

Thanks for your response.

In my scenario=2C actually installing the package is overkill since I want =
to know the installability of a package beforehand.  Repoclosure also solve=
s a different problem=2C in that I care less about some stray package someo=
ne uploaded that's not installable=2C 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=2C do --whatprovides and see if anything comes up.

Satoshi

> To: [email protected]
> From: [email protected]
> Date: Fri=2C 10 Jul 2015 12:22:15 -0400
> Subject: Re: [Yum] Repoquery silently ignores unsatisfied dependencies
>=20
> Satoshi Yagi <[email protected]> writes:
>=20
> > I hope this is the right forum for repoquery=2C 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. bro=
ken 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 packa=
ge 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=2C when I try resolving on repoquery=2C it doesn't say anything=
 about the nonexistent_package=2C 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=2C obv=
iously:
> >
> > $ repoquery --whatprovides nonexistent_package
> > $=20
> >
> > Is there a way to have repoquery report on resolution failures? The cur=
rent behavior is problematic because there is no way to tell when resolutio=
n failed=3B repoquery silently ignores capabilities that didn't resolve and=
 only return what it could resolve=2C which means the result isn't trustwor=
thy.
>=20
>  Yeh=2C 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:
>=20
> yum --releasever=3D/ --installroot=3D/tmp/blah --assumeno \
>  install mypackage
>=20
> ...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=2C but I'm not sure that'd be useful to you or
> anyone else.
>=20
> --=20
> James Antill -- [email protected]
> _______________________________________________
> Yum mailing list
> [email protected]
> http://lists.baseurl.org/mailman/listinfo/yum
 		 	   		  =

--_08f644c0-98ff-4bec-b9d6-04a603cdf64d_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 12pt=3B
font-family:Calibri
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>James=2C<br><br>Thanks for your =
response.<br><br>In my scenario=2C actually installing the package is overk=
ill since I want to know the installability of a package beforehand.&nbsp=
=3B Repoclosure also solves a different problem=2C in that I care less abou=
t some stray package someone uploaded that's not installable=2C so long as =
the ones I care about are installable.<br><br>One obvious solution I found =
so far is to run:<br><br>repoquery --requires<br><br>then for each capabili=
ty=2C do --whatprovides and see if anything comes up.<br><br>Satoshi<br><br=
><div>&gt=3B To: [email protected]<br>&gt=3B From: [email protected]<br=
>&gt=3B Date: Fri=2C 10 Jul 2015 12:22:15 -0400<br>&gt=3B Subject: Re: [Yum=
] Repoquery silently ignores unsatisfied dependencies<br>&gt=3B <br>&gt=3B =
Satoshi Yagi &[email protected]&gt=3B writes:<br>&gt=3B <br>&gt=
=3B &gt=3B I hope this is the right forum for repoquery=2C as I believe it =
is part of yum-utils package.<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B I have an R=
PM in my repo that requires a non-existent package (i.e. broken dependency =
chain).<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B $ repoquery --requires mypackage<=
br>&gt=3B &gt=3B nonexistent_package &gt=3B 3.0<br>&gt=3B &gt=3B this_packa=
ge_exists &gt=3B 1.0<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B Yum correctly identi=
fies this as a problem upon installation:<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B=
 $ sudo yum -y install mypackage<br>&gt=3B &gt=3B # output omitted for brev=
ity<br>&gt=3B &gt=3B --&gt=3B Missing Dependency: nonexistent_package &gt=
=3B 3.0 is needed by package mypackage-0.0.1-2.el5.x86_64 (reponame)<br>&gt=
=3B &gt=3B Error: Missing Dependency: nonexistent_package &gt=3B 3.0 is nee=
ded by package mypackage-0.0.1-2.el5.x86_64 (reponame)<br>&gt=3B &gt=3B<br>=
&gt=3B &gt=3B Yum deplist works as far as detecting the issue:<br>&gt=3B &g=
t=3B<br>&gt=3B &gt=3B $ yum deplist mypackage<br>&gt=3B &gt=3B Finding depe=
ndencies:<br>&gt=3B &gt=3B package: mypackage.x86_64 0.0.1-2.el5<br>&gt=3B =
&gt=3B dependency: nonexistent_package &gt=3B 3.0<br>&gt=3B &gt=3B   Unsati=
sfied dependency<br>&gt=3B &gt=3B dependency: this_package_exists &gt=3B 1.=
0<br>&gt=3B &gt=3B   provider: this_package_exists.x86_64 1.4.6-480.el5<br>=
&gt=3B &gt=3B<br>&gt=3B &gt=3B However=2C when I try resolving on repoquery=
=2C it doesn't say anything about the nonexistent_package=2C and exit code =
is 0.<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B $ repoquery --requires --resolve my=
package<br>&gt=3B &gt=3B this_package_exists-0:1.1.0-394.el5.x86_64<br>&gt=
=3B &gt=3B $ echo $?<br>&gt=3B &gt=3B 0<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B S=
earching for the provider of nonexistent_package comes up empty=2C obviousl=
y:<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B $ repoquery --whatprovides nonexistent=
_package<br>&gt=3B &gt=3B $ <br>&gt=3B &gt=3B<br>&gt=3B &gt=3B Is there a w=
ay to have repoquery report on resolution failures? The current behavior is=
 problematic because there is no way to tell when resolution failed=3B repo=
query silently ignores capabilities that didn't resolve and only return wha=
t it could resolve=2C which means the result isn't trustworthy.<br>&gt=3B <=
br>&gt=3B  Yeh=2C it's not intended to do that it's just an output modifier=
. If<br>&gt=3B you want to test that a package is installable then you want=
 to do<br>&gt=3B something more like:<br>&gt=3B <br>&gt=3B yum --releasever=
=3D/ --installroot=3D/tmp/blah --assumeno \<br>&gt=3B  install mypackage<br=
>&gt=3B <br>&gt=3B ...or the other way is to run repoclosure to make sure t=
he entire<br>&gt=3B repo. works. In theory we could just print the requires=
 if we can't<br>&gt=3B resolve it to anything=2C but I'm not sure that'd be=
 useful to you or<br>&gt=3B anyone else.<br>&gt=3B <br>&gt=3B -- <br>&gt=3B=
 James Antill -- [email protected]<br>&gt=3B __________________________________=
_____________<br>&gt=3B Yum mailing list<br>&gt=3B [email protected]<br=
>&gt=3B http://lists.baseurl.org/mailman/listinfo/yum<br></div> 		 	   		  =
</div></body>
</html>=

--_08f644c0-98ff-4bec-b9d6-04a603cdf64d_--

--===============1039789190583125841==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Yum mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum

--===============1039789190583125841==--