Bug 158187 - rug installs i586 binary instead of x86_64
Summary: rug installs i586 binary instead of x86_64
Status: VERIFIED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Zenworks (show other bugs)
Version: Beta 8
Hardware: Other Other
: P5 - None : Blocker (vote)
Target Milestone: ---
Assignee: Chris Rivera
QA Contact: Jawaad Tariq
URL:
Whiteboard:
Keywords: Fix_is_Checked_In
Depends on:
Blocks:
 
Reported: 2006-03-15 10:27 UTC by Andreas Jaeger
Modified: 2006-06-06 11:03 UTC (History)
6 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
zmd-backend log (227.26 KB, application/x-bzip2)
2006-03-15 10:27 UTC, Andreas Jaeger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2006-03-15 10:27:22 UTC
$ rug search gnokii

S | Catalog | Bundle | Name             | Version  | Arch
--+---------+--------+------------------+----------+-------
  | factory |        | gnokii           | 0.6.10-6 | i586
  | factory |        | gnokii           | 0.6.10-6 | x86_64
  | factory |        | gnokii-debuginfo | 0.6.10-6 | x86_64
  | factory |        | gnokii-debuginfo | 0.6.10-6 | i586
  | factory |        | gnokii-devel     | 0.6.10-6 | i586
  | factory |        | gnokii-devel     | 0.6.10-6 | x86_64
  | factory |        | gnokii-smsd      | 0.6.10-6 | x86_64
  | factory |        | gnokii-smsd      | 0.6.10-6 | i586
  | factory |        | xgnokii          | 0.6.10-6 | i586
  | factory |        | xgnokii          | 0.6.10-6 | x86_64

aj@reger:~> rug info gnokii
Catalog: System
Name: gnokii
Version: 0.6.10-6
Arch: i586
Installed: Yes
Status: up-to-date
Installed Size: 2120862
Summary: Nokia Connectivity Program
Description: gnokii is a package of programs for communicating with a Nokia cellular
phone in Linux. Read the READMEs in /usr/share/doc/packages/gnokii to
find out which models are supported
Comment 1 Andreas Jaeger 2006-03-15 10:27:40 UTC
Created attachment 72966 [details]
zmd-backend log
Comment 2 Tambet Ingo 2006-03-17 11:12:29 UTC
There used to be a naming convention to add '-32bit' to the end of ix86 package name in case there's a package with same name for x86_64 arch. Is this still true? If yes, then this bug is invalid. If not, then we need to discuss what to do in that case. Which package should get installed? The x86_64 version? What if one of these is already installed? What if I acctually want i586 version? Both? Can zypp's resolver handle that? I know libredcarpet's can not.

My personal opinion is that we should install both (like yum does, for example) but adding new functionality to resolvers doesn't sound very appealing after beta 8.
Comment 3 Andreas Jaeger 2006-03-17 11:16:30 UTC
We only add -32bit for library packages.  In those cases you have a:
libxy-32bit.x86_64.rpm

But with normal packages the setup is correct - and libzypp handles this fine, it installs the i586 gnokii package and not the x86-64 one.

It should only install one package not both, you get otherwise file conflicts.
Comment 4 Tambet Ingo 2006-03-17 11:32:43 UTC
I'm really confused now. First, you open a bug report with a summary 
"rug installs i586 binary instead of x86_64"

and then you say

"But with normal packages the setup is correct - and libzypp handles this fine,
it installs the i586 gnokii package and not the x86-64 one."
Comment 5 Andreas Jaeger 2006-03-17 11:49:36 UTC
The last sentence was wrong.  During a new install with YaST/libzypp I will get the x86-64 package as desired and *not* the i586 one.  But accessing the same catalog with rug I get an i586 binary.
Comment 6 Tambet Ingo 2006-03-17 12:08:27 UTC
Ok. So now I'm confused about the output from the inital description. First, 'rug search' shows none of the gnokii versions is installed. Then, the following command, 'rug info' shows it is installed. Did you do something in between? How did the gnokii suddenly got installed?

Apart from all that, I just committed some changes for rug with the following commit message:

"       Implement more advanced format for 'install'
	command. It is now possible to specify resolvables in the following
	formats:

	name
	name.arch
	name-version
	name-version-release
	name-version-release.arch
	name-epoch:version-release.arch
	epoch:name-version-release.arch
	/path/to/local/package.rpm
"

So it's possible to specify which arch you need.
Comment 7 Andreas Jaeger 2006-03-17 12:19:21 UTC
I missed to show the "rug in gnokii" line in between :-(

That helps a lot!

Still what happens on my x86_64 system if I do the following?

rug in gnokii

It should install the gnokii.x86_64.rpm (if one exists).
Comment 8 Tambet Ingo 2006-03-17 12:30:54 UTC
The logic is to take all the specified constraints from the command line (catalog, allow unsubscribed, name, version, release, epoch, arch), get a list of matching packages and filter out all older versions of every name,arch pair. So in short, if there's multiple archs of the same package available it tries to install both.
Comment 9 Andreas Jaeger 2006-03-17 12:34:09 UTC
Adding multiple packages is not the right solution.
Comment 11 Tambet Ingo 2006-03-17 12:52:36 UTC
Why is it better to install the 64 bit version? If there's also a 32 bit package for the same thing, I'd think it's there because it's needed. Why would we want to guess if we have no information to base the guess? So we don't, if the packages have file conflicts, the resolver tells us. User gets the error and has to specify which one is wanted.

Anyway, lowering the severity, there is at least a workaround, either way to following discussions goes.
Comment 12 Andreas Jaeger 2006-03-17 13:06:40 UTC
No, it's not there because we have a tree that is multiarch and contains rpms for all possible architectures!
Comment 13 Tambet Ingo 2006-03-17 13:18:06 UTC
Oh, right. There's one shared repository that provides packages for all architectures, including 64 bit architectures? On 64 bit systems, people should have only 64 bit packages unless they have '-32bit' in the name?
Comment 14 Tambet Ingo 2006-03-17 13:19:45 UTC
I typoed the last sentence, sorry. What I meant was:

On 64 bit systems, people should have only 64 bit packages unless package name contains '-32bit'?
Comment 15 Naresh Wignarajah 2006-03-17 13:55:37 UTC
Adding kkaempf to the cc as an fyi.
Comment 16 Andreas Jaeger 2006-03-17 14:39:27 UTC
If there is a package available both as x86 and x86-64 version, the x86-64 should be installed.

If there's only a x86 version that version should get installed.
Comment 17 Tambet Ingo 2006-03-17 14:51:20 UTC
But how do you know that package is meant to be installed on 64 bit machine? When we have all packages for all architectures in one metadata, how do you make a difference whether a package is meant to be installed only on i386 platform (depends on foo) or whether it's meant to be installed on 64 bit machine (depends on foo-32bit)?

It doesn't look like this discussion is going anywhere here, I'll start a discussion on the mailing list.
Comment 18 Klaus Kämpf 2006-03-17 15:53:11 UTC
With multi-arch catalogs, you can install i686(i586,...) and x86_64 machines from the same package repository. zypp does two things to accomplish that:
- filter out incompatible architectures (filter out x86_64 on i686 systems)
- if multiple providers are present (i.e. a i586 and a x86_64 system), choose the 'best' one.


Tambet, zmd needs knowledge about
- the target systems architecture
- the architecture compatibility list
- the architecture score (iirc, libredcarpet calls it 'score')

libzypp has all this knowledge.
Should we export this to a (new) sqlite table so libzypp and zmd have the same view on architecture, compatiblity, and score ?
Comment 19 Tambet Ingo 2006-03-17 16:11:18 UTC
zmd has that knowledge, thank you.

From this specific example, it looks like the gnokii.i586 is never meant to be installed on x86_64. If there were a reason to have that package available for x86_64, then it would have -32bit in the name. Yes, you can run 32 bit binaries on x86_64, but you can't install random 32 bit rpms which are built for 32 bit platform only. This would be possible only if there's always a 64 bit and a 32 bit version of everything and these two versions never conflict with each other.
Comment 20 Andreas Jaeger 2006-03-17 16:28:49 UTC
Since we have both gnokii.i586 and gnokii.x86_64, gnokii.i586 should not get installed by default on x86_64.

but for other programs like OpenOfficeOrg we have only an i586 package, so OOo.i586 should get installed on x86_64.
Comment 21 Naresh Wignarajah 2006-03-27 01:44:01 UTC
Chris to review code/solution with James and Tambet prior to checkin.
Comment 22 Andreas Jaeger 2006-03-29 09:05:39 UTC
Is this still open - or fixed with the latest submissions?
Comment 23 Chris Rivera 2006-03-30 00:32:21 UTC
This is fixed now.  It will be available in autobuild shortly.
Comment 24 Naresh Wignarajah 2006-03-30 00:45:08 UTC
r26462
Comment 25 Heiko Rommel 2006-06-06 11:03:27 UTC
Verified with SLES10 RC2 x86_64:

- deinstalled nautilus. reinstalled with rug -> arch x86_64 was chosen among i586
- installed OpenOffice (from Stable) -> arch i586 was chosen