Bug 460783 - yum install <virtual-provides>, installs different package names on multiarch
Summary: yum install <virtual-provides>, installs different package names on multiarch
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 9
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-31 19:35 UTC by Ville Skyttä
Modified: 2014-01-21 23:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-21 18:06:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
yum -d 9 --disablerepo="*" --enablerepo=fedora --enablerepo=updates install java-devel (56.83 KB, text/plain)
2008-09-04 15:46 UTC, Ville Skyttä
no flags Details

Description Ville Skyttä 2008-08-31 19:35:09 UTC
yum 3.2.19-1.fc9 in F-9, x86_64, no packages providing java-devel installed:

# yum install java-devel
[...]
Installing:
 java-1.5.0-gcj-devel       x86_64   1.5.0.0-21.fc9           fedora       46 k
 java-1.6.0-openjdk-devel   i386     1:1.6.0.0-0.16.b09.fc9   updates     9.0 M
Installing for dependencies:
[...]

Bugs, IMO:
- Should not install two packages.
- i386 version of java-1.6.0-openjdk-devel installed instead of x86_64.

I think the correct behavior would be to get only java-1.6.0-openjdk-devel.x86_64 (not i386).  Until bug 460781 is resolved, I'd understand getting either java-1.5.0-gcj-devel.x86_64 or java-1.6.0-openjdk-devel.x86_64, but not both.

Comment 1 Ville Skyttä 2008-08-31 19:41:50 UTC
Forgot to mention that this together with bug 460761 can cause bad builds (eg. i386 code compiled into x86_64 packages on x86_64) that go unnoticed, or if we're fortunate and these packages have test suites, build failures.

Bumping priority/severity accordingly.  Also happens in mock buildroots for current Rawhide x86_64.

Comment 2 Ville Skyttä 2008-09-02 21:52:49 UTC
On a 2nd thought, I'm not 100% sure if this issue can result in i386 code built into x86_64 packages.  But test suite failures do happen.

Comment 3 James Antill 2008-09-03 15:34:50 UTC
 Can you attach a full "-d 9" of the yum install.

Comment 4 Ville Skyttä 2008-09-04 15:46:54 UTC
Created attachment 315767 [details]
yum -d 9 --disablerepo="*" --enablerepo=fedora --enablerepo=updates install java-devel

Comment 5 Ville Skyttä 2008-09-04 15:49:09 UTC
Just to try it out, I also tried with --disableplugin="*", but it did not make a difference.

Comment 6 James Antill 2008-09-04 16:18:08 UTC
 Do you have multilib_policy=all ?

 The trace shows:

Potential match for java-devel from java-1.5.0-gcj-devel-1.5.0.0-21.fc9.x86_64
Matched java-1.5.0-gcj-devel-1.5.0.0-21.fc9.x86_64 to require for java-devel
Potential match for java-devel from 1:java-1.6.0-openjdk-devel-1.6.0.0-0.10.b09.fc9.x86_64
Matched 1:java-1.6.0-openjdk-devel-1.6.0.0-0.10.b09.fc9.x86_64 to require for java-devel
Potential match for java-devel from 1:java-1.6.0-openjdk-devel-1.6.0.0-0.10.b09.fc9.i386
Matched 1:java-1.6.0-openjdk-devel-1.6.0.0-0.10.b09.fc9.i386 to require for java-devel
Potential match for java-devel from 1:java-1.6.0-openjdk-devel-1.6.0.0-0.16.b09.fc9.i386
Matched 1:java-1.6.0-openjdk-devel-1.6.0.0-0.16.b09.fc9.i386 to require for java-devel
Potential match for java-devel from 1:java-1.6.0-openjdk-devel-1.6.0.0-0.16.b09.fc9.x86_64
Matched 1:java-1.6.0-openjdk-devel-1.6.0.0-0.16.b09.fc9.x86_64 to require for java-devel
[...]
---> Package java-1.5.0-gcj-devel.x86_64 0:1.5.0.0-21.fc9 set to be updated
[...]
---> Package java-1.6.0-openjdk-devel.i386 1:1.6.0.0-0.16.b09.fc9 set to be updated

...I'm not 100% sure this is really a bug (ask to install a provides with multilib_policy=all, and you get two packages as each one only provides half of the arch).

Comment 7 James Antill 2008-09-04 16:20:30 UTC
 Actualy, openjdk provides both arches ... just that gcj is considered "better", so we take that for the arches it's on. Maybe we want to change that so it'll just pick openjdk. Of course then people get a different .x86_64 package depending on what they have for multilib_policy ... which seems too magic.
 Gah.

Comment 8 Ville Skyttä 2008-09-04 16:39:13 UTC
I have multilib_policy=best.

Comment 9 James Antill 2008-09-04 19:26:21 UTC
 Ok, I've just tried it using just:

 yum remove java-devel

 yum install java-devel

...what happens is:

YumBase.install(pattern='java-devel')

  # Try package name match:
  parsePackages() = no matches
  # So try dep match: 
    returnPackagesByDep() = all versions/arches of gcj and openjdk
    bestPackagesFromList() = latest version, best arch, for each package
[...]
  later code treats packages with different names as different, as they might have come from a wildcard match.

...so I've fixed bestPackageFromList to only return a single package, in the dep. case. upstream commit: 8732871e2946b1cf5237cf1b2ed7517d4fa5261c.
 The current behaviour is to just drop the .i386 pacakge, which I think is the right thing to do.

Comment 10 James Antill 2008-09-04 19:41:44 UTC
Of course I screwed it up at the last minute so you need upstream commit: 2a08589d63a21af98c533fe0c6e37e298617e5bd as well.

Comment 11 Ville Skyttä 2008-09-20 11:07:11 UTC
The patches seem to work, now only java-1.5.0-gcj-devel.x86_64 is installed, thanks.  I find it unfortunate that it does not pick java-1.6.0-openjdk-devel.x86_64 instead but we've discussed that in another bug.

Comment 12 seth vidal 2009-01-21 18:06:03 UTC
this is fixed upstream and it is available in a current release of yum.


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