[Rpm-ecosystem] hawkey be more informative on failure to solve a goal?
Anne Mulhern
amulhern at redhat.com
Wed May 20 12:40:16 UTC 2015
That is definitely like what I want (although I feel like I would prefer something more structured
than a list of strings that have to be parsed by a client application).
But I was playing around with it and I noticed another thing that puzzled me.
A Package has attributes requires, provides, recommends, suggests, supplements, enhances, conflicts
but the contents of the requires attribute clearly correspond to what is listed
as BuildRequires, not what is listed as Requires (for my spec file).
Can you tell me what is going on there?
Thanks!
- mulhern
P.S. My python interactions look something like this:
>>> pkg = q[0]
>>> g.install(pkg)
>>> g.run()
False
>>> g.problems
['nothing provides gettext needed by python-blivet-1:1.0.0.0-1.el6.src']
>>> len(sack)
1
>>> pkg.requires
[<_hawkey.Reldep object, id: 192>, <_hawkey.Reldep object, id: 193>, <_hawkey.Reldep object, id: 18446744071562067969>, <_hawkey.Reldep object, id: 18446744071562067970>]
>>> [str(r) for r in pkg.requires]
['gettext', 'python-setuptools', 'rpmlib(FileDigests) <= 4.6.0-1', 'rpmlib(CompressedFileNames) <= 3.0.4-1']
gettext and python-setuptools are explicit BuildRequires in the spec file, I gather the two rpmlibs are implicit
BuildRequires. About 20 additional things are listed as Requires in the spec file.
Note that my sack contains only 1 package, the one I'm setting up the goal for, so as to ensure
failure w/out too much thinking.
Version of hawkey is 0.5.3.
- mulhern
----- Original Message -----
> From: "Radek Holy" <rholy at redhat.com>
> To: "Anne Mulhern" <amulhern at redhat.com>
> Cc: rpm-ecosystem at lists.rpm.org
> Sent: Wednesday, May 20, 2015 6:15:17 AM
> Subject: Re: [Rpm-ecosystem] hawkey be more informative on failure to solve a goal?
>
> ----- Original Message -----
> > From: "Anne Mulhern" <amulhern at redhat.com>
> > To: rpm-ecosystem at lists.rpm.org
> > Sent: Tuesday, May 19, 2015 8:35:08 PM
> > Subject: [Rpm-ecosystem] hawkey be more informative on failure to solve a
> > goal?
> >
> > Hi!
> >
> > Will hawkey ever be able to give back anything more than a simple False if
> > a
> > goal run fails?
> > It could indicate the missing dependencies that cause the failure.
> >
> > I believe that the SAT solver phrase associated with this idea is "clause
> > learning", since the idea
> > is to learn the clause in the Boolean expression most responsible for
> > preventing the solution.
> >
> > - mulhern
> > _______________________________________________
> > Rpm-ecosystem mailing list
> > Rpm-ecosystem at lists.rpm.org
> > http://lists.rpm.org/mailman/listinfo/rpm-ecosystem
> >
>
>
> Hello, please take a look at the "problems" property [1]. Here, you can see
> some basic usage: [2] and [3]. Please let us know if something is unclear.
>
> [1]
> https://github.com/rpm-software-management/hawkey/blob/21448d1753798aa31f4a714f8442a2cbccfcdf58/src/python/__init__.py#L180
> [2]
> https://github.com/rpm-software-management/hawkey/blob/77faae1a60c6ea858dcc328c00baca5d6060a9cb/tests/python/tests/test_goal.py#L188
> [3]
> https://github.com/rpm-software-management/hawkey/blob/77faae1a60c6ea858dcc328c00baca5d6060a9cb/tests/python/tests/test_goal.py#L201
>
> Best regards
> --
> Radek Holý
> Associate Software Engineer
> Software Management Team
> Red Hat Czech
>
More information about the Rpm-ecosystem
mailing list