Bug 749130 - prefer packages that are already selected for installation when resolving deps
Summary: prefer packages that are already selected for installation when resolving deps
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 748585
TreeView+ depends on / blocked
 
Reported: 2011-10-26 09:48 UTC by David Tardon
Modified: 2014-01-21 23:20 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-27 16:19:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
a.spec (321 bytes, text/plain)
2011-10-26 09:48 UTC, David Tardon
no flags Details
b.spec (321 bytes, text/plain)
2011-10-26 09:49 UTC, David Tardon
no flags Details
c.spec (333 bytes, text/plain)
2011-10-26 09:49 UTC, David Tardon
no flags Details
repo config. (98 bytes, text/plain)
2011-10-26 09:50 UTC, David Tardon
no flags Details
yum install --debuglevel=10 c (2.65 KB, text/plain)
2011-10-27 04:43 UTC, David Tardon
no flags Details

Description David Tardon 2011-10-26 09:48:00 UTC
Description of problem:
Lets assume I have a package that requires foo and want to install it. If there are two (or more) packages that provide foo, neither of them installed, yum selects one of them and adds it to the installation set. But, if the other package is already selected (through some other symbol it provides), yum wants to install both of them.

Version-Release number of selected component (if applicable):
yum-3.4.3-5.fc16.noarch

How reproducible:
always

Steps to Reproduce:
1. get the attached spec files
2. build the rpms
3. put the rpms to a dir, say, /tmp/yumtest
4. createrepo /tmp/yumtest
5. put the attached yumtest.repo to /etc/yum.repos.d
6. yum install c
  
Actual results:
a, b and c are selected for installation.

Expected results:
Just a and c are selected for installation.

Comment 1 David Tardon 2011-10-26 09:48:39 UTC
Created attachment 530266 [details]
a.spec

Comment 2 David Tardon 2011-10-26 09:49:10 UTC
Created attachment 530267 [details]
b.spec

Comment 3 David Tardon 2011-10-26 09:49:41 UTC
Created attachment 530268 [details]
c.spec

Comment 4 David Tardon 2011-10-26 09:50:37 UTC
Created attachment 530269 [details]
repo config.

Comment 5 James Antill 2011-10-26 19:46:13 UTC
Can you provide the output, as I'd assume what's happening is that it's resolving "requires: foo" first, and choosing b ... as I'm pretty sure it'll do the right thing if it resolves a first (Eg. yum install a c).

Comment 6 David Tardon 2011-10-27 04:43:07 UTC
Created attachment 530425 [details]
yum install --debuglevel=10 c

Comment 7 James Antill 2011-10-27 16:19:48 UTC
Yeh, as I thought:

c-1-1.fc16.noarch requires: foo
--> Processing Dependency: foo for package: c-1-1.fc16.noarch
[...]
TSINFO: Marking b-1-1.fc16.noarch as install for c-1-1.fc16.noarch

c-1-1.fc16.noarch requires: a
--> Processing Dependency: a for package: c-1-1.fc16.noarch

...there are some tricks you can use to have the specific requirment run first (Eg. yum will prefer versioned requires, and prefers them in this order: =, <, <=, >, >=). But atm. we can't easily make it go back and make a different choice.

Comment 8 David Tardon 2011-10-27 18:25:23 UTC
(In reply to comment #7)
> Yeh, as I thought:
> 
> c-1-1.fc16.noarch requires: foo
> --> Processing Dependency: foo for package: c-1-1.fc16.noarch
> [...]
> TSINFO: Marking b-1-1.fc16.noarch as install for c-1-1.fc16.noarch
> 
> c-1-1.fc16.noarch requires: a
> --> Processing Dependency: a for package: c-1-1.fc16.noarch
> 
> ...there are some tricks you can use to have the specific requirment run first
> (Eg. yum will prefer versioned requires, and prefers them in this order: =, <,
> <=, >, >=). But atm. we can't easily make it go back and make a different
> choice.

I can do that for explicit dependencies, but not for generated ones. My use case is bug 748585, where (generated) dependency on libjawt.so()(...) in libreoffice-core selects java-1.7.0-openjdk and (explicit) dependency on jre >= 1.5.0 in libreoffice-ure selects java-1.6.0-openjdk.


Note You need to log in before you can comment on or make changes to this bug.