Bug 460783 - yum install <virtual-provides>, installs different package names on multiarch
yum install <virtual-provides>, installs different package names on multiarch
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
9
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-31 15:35 EDT by Ville Skyttä
Modified: 2014-01-21 18:06 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-21 13:06:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Ville Skyttä 2008-08-31 15:35:09 EDT
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 15:41:50 EDT
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 17:52:49 EDT
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 11:34:50 EDT
 Can you attach a full "-d 9" of the yum install.
Comment 4 Ville Skyttä 2008-09-04 11:46:54 EDT
Created attachment 315767 [details]
yum -d 9 --disablerepo="*" --enablerepo=fedora --enablerepo=updates install java-devel
Comment 5 Ville Skyttä 2008-09-04 11:49:09 EDT
Just to try it out, I also tried with --disableplugin="*", but it did not make a difference.
Comment 6 James Antill 2008-09-04 12:18:08 EDT
 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 12:20:30 EDT
 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 12:39:13 EDT
I have multilib_policy=best.
Comment 9 James Antill 2008-09-04 15:26:21 EDT
 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 15:41:44 EDT
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 07:07:11 EDT
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 13:06:03 EST
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.