Bug 737596 - Don't ask for multi-arch every time
Summary: Don't ask for multi-arch every time
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: zif
Version: 16
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-12 16:23 UTC by Bastien Nocera
Modified: 2011-09-17 06:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-17 06:28:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bastien Nocera 2011-09-12 16:23:49 UTC
$ pkcon install libzeitgeist-devel
More than one package matches:
1. libzeitgeist-devel-0.3.10-1.fc16.x86_64 [fedora]
2. libzeitgeist-devel-0.3.10-1.fc16.i686 [fedora]
Please choose the correct package: 1
Simulating install            [=========================]         
Starting                      [=========================]         
Running                       [=========================]         
Resolving dependencies        [=========================]         
Installing                    [=========================]         
Waiting for authentication    [=========================]         
Waiting in queue              [=========================]         
Starting                      [=========================]         
Running                       [=========================]         
Resolving dependencies        [=========================]         
Downloading packages          [=========================]         
Testing changes               [=========================]         
Installing packages           [=========================]         
Scanning applications         [=========================]

Instead, it should default to using the x86_64 package, unless I ask it to install libzeitgeist-devel.i686, similarly to yum.

Comment 1 Andre Robatino 2011-09-13 07:07:03 UTC
I see this on F15 x86_64 as well, but "yum install libzeitgeist-devel" defaults to installing libzeitgeist-devel.x86_64 without asking. On F16 x86_64, "yum install libzeitgeist-devel" tries to pull in 32-bit packages and then fails due to a "Protected multilib versions" error. The same thing happens even with "yum install libzeitgeist-devel.x86_64".

Comment 2 Bastien Nocera 2011-09-13 15:09:30 UTC
I'm using the zif backend of PackageKit, not the yum one or yum.

Andre, you'll want to file a separate bug about this.

Comment 3 Richard Hughes 2011-09-14 12:52:14 UTC
Right, so fixing this isn't straightforward if we want to keep things quick. I've applied the following to zif upstream:

commit 08cc0b757d04bc366e0c7eb4cb6073b82631104a
Author: Richard Hughes <richard>
Date:   Wed Sep 14 13:08:07 2011 +0100

    Add architecture and version resolve filtering to ZifMdPrimarySql

:100644 100644 deee4eb... 87b65ba... M  libzif/zif-md-primary-sql.c
:100644 100644 431792d... 40aaeb8... M  libzif/zif-self-test.c
:100644 100644 59f8a93... 3455fd8... M  libzif/zif-store-remote.c
:100644 100644 e127938... 44c7eeb... M  libzif/zif-store.c
:100644 100644 26eb76a... 6b793d7... M  libzif/zif-store.h

commit f055a23c8369606d612a4530b98f9c24c23aa132
Author: Richard Hughes <richard>
Date:   Wed Sep 14 12:34:25 2011 +0100

    Add architecture and version resolve filtering to ZifMdPrimaryXml

:100644 100644 6bef71c... deee4eb... M  libzif/zif-md-primary-sql.c
:100644 100644 9b55911... 3daea92... M  libzif/zif-md-primary-xml.c
:100644 100644 bb528da... cf96e47... M  libzif/zif-md.c
:100644 100644 b13b277... 274e83c... M  libzif/zif-md.h
:100644 100644 1034507... 431792d... M  libzif/zif-self-test.c

commit 59962729cd9908b089736ccac001ffd31988eb98
Author: Richard Hughes <richard>
Date:   Wed Sep 14 09:46:39 2011 +0100

    Add zif_store_resolve_full() to resolve with lookup flags
    
    This allows us to match name-version and name.arch in the future.

:100644 100644 92e1251... 1034507... M  libzif/zif-self-test.c
:100644 100644 eefc1ff... af460ab... M  libzif/zif-store-array.c
:100644 100644 01de98d... ce007e8... M  libzif/zif-store-array.h
:100644 100644 3b35292... 59f8a93... M  libzif/zif-store-remote.c
:100644 100644 6ca9a46... e127938... M  libzif/zif-store.c
:100644 100644 1647084... 26eb76a... M  libzif/zif-store.h
:100644 100644 6d2597d... 6a25e84... M  tools/zif-main.c

and the following to PackageKit:

commit 61b51c493c522ab8971fdc18a817cff4b68b8315
Author: Richard Hughes <richard>
Date:   Wed Sep 14 13:45:18 2011 +0100

    zif: Use zif_store_array_resolve_full() when possible

---

I'll think a bit more about how the front-end should signal the package manager to *infer* the native arch as it's not clear cut, for instance:

installed: upower.x86_64
available: upower.x86_64
available: upower.i386

should "zif install upower" say that upower is already installed, or offer to install the non-native package? I think it makes sense to do the former, as we can always do "zif install upower.i386" if we really mean to install the non-native package.

Basically, multilib is hard to do right. I'll work on this a bit more tonight.

Richard

Comment 4 Richard Hughes 2011-09-14 13:34:17 UTC
Another commit to zif:

commit fd164226e54a92c9115b8b6f6317e5df3e825eb8
Author: Richard Hughes <richard>
Date:   Wed Sep 14 14:33:05 2011 +0100

    Prefer the native arch when resolving if the ZIF_STORE_RESOLVE_FLAG_PREFER_NATIVE flag is set

Comment 5 Richard Hughes 2011-09-14 13:42:01 UTC
And, to PackageKit, a single line:

commit d650cc58d0fa703220cb61add88ed0dcc7ee6fd8
Author: Richard Hughes <richard>
Date:   Wed Sep 14 14:40:32 2011 +0100

    zif: Prefer native packages when resolving user input
    
    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=737596

---

I'll do new releases of both PK and zif in about 3 weeks time.

Comment 6 Bastien Nocera 2011-09-17 00:41:06 UTC
\o/

It's all about expectations. On multi-lib systems, unless you forcefully required an i686 package, you'd want to have the native one instead.

Comment 7 Richard Hughes 2011-09-17 06:28:36 UTC
(In reply to comment #6)
> \o/
> 
> It's all about expectations. On multi-lib systems, unless you forcefully
> required an i686 package, you'd want to have the native one instead.

Agreed. This is how it works currently.

Ohh, and this ticket might interest you: https://fedorahosted.org/fesco/ticket/669


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