Bug 821 - Zypper: Package dependency resolution does not know about hinting
Summary: Zypper: Package dependency resolution does not know about hinting
Status: VERIFIED INVALID
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.4
Assignee: Mark Hatle
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 970
  Show dependency tree
 
Reported: 2011-03-08 10:52 UTC by Mark Hatle
Modified: 2013-03-14 11:20 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hatle 2011-03-08 10:52:17 UTC
Within RPM5, there is a concept of dependency hints.  The hints indicate if the dependency is required or if it's suggested.  A suggested dependency is one that if it's not installed will not cause a failure condition.

Symptoms are that suggested items are always installed -- if they are not available to be installed Zypper may return error messages about missing dependencies.
Comment 1 Qing He 2011-04-28 01:50:23 UTC
I'm reading RPMSENSE_MISSINGOK being used in neither createrepo, sat-solver nor libzypp, so basically there is no simple way to support this.

I'm not very familiar with RPM, but from what I read, it seems that traditionally rpm and family didn't support "suggests:". Now rpm5 supports it, but not many supporting utilities around it.

Generally there're two approaches to solve it:
1. working out a full support suggests: like debian
   This approach may well take a lot of effort on many different components, it may even have a chance of not doable at all based on current repomd format of repositories.

2. completely ignore suggests: 
   Either in rpmbuild or in createrepo/sat-solver/libzypp. This approach seems more practical to me.

Mark, what's your opinion?
Comment 2 Mark Hatle 2011-04-28 09:18:35 UTC
The sat solver component has a concept of weak dependencies built into it.  I'm not sure if createrepo does, but I suspect it does.

This is used in SuSe, but uses a different set of flags.

We need to support the suggests because it's the method that Poky/OE-Core already uses to determine installation rules.  The internal resolver within RPM5 is also using these capabilities to avoid reporting errors, as we attempt a move to the zypper/sat-solver for the system installation we'll need the capabilities.

In the sat-solver if you look at the sources in the "src" directory you will see numerous comments discussion suggests and recommends.  So we need to get the format in Zypper and/or createrepo correct to invoke the code in the sat-solver to handle these special cases of resolution.

As mentioned above, I know SuSe used this code in their own products, so it might make sense to see if they have any SuSe specific switches or patches to their RPM 4.  This would at least tell us how to hook in to the sat solver with the "hints", and then we just need to determine how to pull this data out of the RPM packages and place it into the various databases (including the on-disk dynamic DB)
Comment 3 Jessica 2012-05-01 16:33:11 UTC
Mark, any comment on this bug?
Comment 4 Mark Hatle 2012-05-08 15:35:11 UTC
I have recently tried to uprev Zypper with no success.  An uprev is a precondition on working on this particular issue.

I don't have a reasonable estimate to the amount of work required.

Setting a very high estimate.
Comment 5 Alexandru Georgescu 2012-08-27 09:49:22 UTC
Hi,
Is there any update regarding this bug?

Thanks,
Alex.
Comment 6 Paul Eggleton 2013-01-25 11:35:51 UTC
Zypper has now been replaced by Smart for RPM, and the latter supports hinting (recommends), so this shouldn't be an issue anymore.
Comment 7 Stoicescu Cornel 2013-03-14 11:20:45 UTC
Verified as per above comment.