Multiarch strategy for software-center-agent

Bug #966335 reported by Michael Vogt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Fix Released
Medium
Anthony Lenton

Bug Description

I worked on the multiarch support for software-center apps coming from the agent today and after some poking
and experimenting I think the best (and most reliable) solution involves using the software-center-agent.

The problem is that a foreign architecture application in the client (and in the python-apt cache) needs to be
postfixed with a ":arch", e.g. skype:i386 otherwise the client will not find it. We could do that automatically for
apps that are not available for the native architecture and try to guess the pkgname. The downside of this approach
is that we may simply guess incorrectly and present applications that may not be mutliarch ready or that are not
availalbe for the native architecture yet because of e.g. amd64 taking longer to build than i386.

So I would like to propose that we add a new architecture "amd64-multiarch" to the agent. If the app-developer uploads
a i386 application he may check "this will work on a multiarch amd64 system too" and in this case the software-center-agent
needs to send the pkgname postfixed with a ":i386" to the client. The client will then do the right thing with the pkgname
because its unambiguous.

Alternatively (but not quite as elegant) is to simply add nothing to the server but instead build the packages so that there
is a "pkgname" package on both i386 and amd64 and a "pkgname-bin" on i386 only. The "pkgname" package needs to depend
on "pkgname-bin" and in this case software-center/aptdaemon will again DTRT and install the right package/dependencies.

QA steps:
 1) Publish an app, setting the architecture as multiarch
 2) Verify that the app appears in USC for both i386 and amd64 (or check /api/2.0/applications/en/ubuntu/precise/i386/ and /api/2.0/applications/en/ubuntu/precise/amd64/
 3) Verify that the package name in the amd64 link above is postfixed with :i386
 4) Verify that you can install the app from USC on both architectures.

Changed in software-center-agent:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Anthony Lenton (elachuni) wrote :

A couple of questions to spec this out better:

 - If you select *only* "amd64-multiarch", which archs should include the package in the list of available apps for purchase?
 - If you select *only* "amd64-multiarch", which archs (of the ones answered in the previous point) should suffix the package name with ":i386"?
 - Which arch combinations would make sense? That is, if you select "amd64-multiarch", should also be able to select "amd64" and/or "i386" for the same distroseries? If any, how would that affect the arches that include the app, and which of them get the suffixed package name?

As I understand it, this would be either (A):
 - If you select "amd64-multiarch", both "i386" the and "amd64" lists will include the package.
 - Only "amd64" will have the package name suffixed.
 - If you select "amd64-multiarch", then you can't select any other arch (the review form validation would prevent it).

Or (B):
 - If you select "amd64-multiarch", then only the "amd64" list will include the package.
 - "amd64" will have the package name suffixed.
 - If you select "amd64-multiarch", then you can (and usually will!) also select "i386", that would behave as "i386" usually does.

Could you confirm if either of these sound right, or let us know what you would expect?

Revision history for this message
Michael Vogt (mvo) wrote :

Hey Anthony, sorry for my slow reply on the question.

If you select "amd64-via-multiarch" that should mean that the package is automatically available for i386 *and* amd64, but the amd64 name is "pkgname:i386".

The following combinations make sense:
 i386 + amd64
 i386 + amd64-via-multiarch

The others do not make sense, its either "amd64" or "amd64-via-multiarch" (as the later is really just i386 and the confidence that it will work on a multiarch system).

I'm not sure I understand the question about (A) and (B) as the line "both "i386" the and "amd64" lists will include the package." is not clear to me. What "lists" are that?

Revision history for this message
Anthony Lenton (elachuni) wrote :

Hi mvo, thanks for the reply.

re: "both "i386" the and "amd64" lists will include the package." grief, sorry about my grammar there.

That meant to say "both the 'i386' and 'amd64' lists will include the package". These lists are the lists of available apps for purchase, returned by the sca API.

It seems we're on the same page here, summing up:
- The package name will only be suffixed with ":i386" on amd64.

- To make the UI more consistent I think I'd prefer if the amd64-multiarch architecture only made the app available on amd64 (with a suffixed package name). The developer would usually also select i386 as an architecture in this case, with the expected results, but the server side wouldn't enforce this.

Please confirm if this sounds ok, or ping me so we can step up the speed on this conversation :)
Thanks!

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: [Bug 966335] Re: Multiarch strategy for software-center-agent

On Mon, Jun 18, 2012 at 9:56 PM, Anthony Lenton
<email address hidden> wrote:
> It seems we're on the same page here, summing up:
> - The package name will only be suffixed with ":i386" on amd64.
>
> - To make the UI more consistent I think I'd prefer if the
> amd64-multiarch architecture only made the app available on amd64 (with
> a suffixed package name). The developer would usually also select i386
> as an architecture in this case, with the expected results, but the
> server side wouldn't enforce this.

Hi Anthony. Don't we need to enforce this though? As selecting
amd64-multiarch means that the i386 package can be installed from the
archive and installed on amd64 systems - AIUI (or have I
misunderstood), which would mean that the reviewer *must* ensure it's
available for i386 (in the archive) to select this? Or maybe you're
aware of that but think the UI would be more consistent without that
restriction?... Ah, or, if the reviewer selects amd64-multiarch, we
*automatically* add i386 to the arches for that app?

Revision history for this message
Anthony Lenton (elachuni) wrote :

Hi Noodles!

I wasn't thinking of either validating or automatically adding the i386 arch when amd64:multiarch is selected. This could definitely help, either if it complains when the reviewer selects only amd64:multiarch or if it automatically adds i386, but I don't think it's really necessary, right? I mean, afaict the only undesired side-effect if you select *only* amd64:multiarch is that people on i386 wouldn't be offered to download the app, when we're certain that it would work.

Possibly adding i386 when amd64:multiarch is selected, via javascript on the client, would be better than validating server side. That way if for any reason at some point amd64:multiarch makes sense on its own, the user can still explicitely de-select i386 (after it's been added by clicking on amd64:multiarch), and submit the form like that.

Any of these options I'd give extra points, but if not I think we can trust the reviewers to select the right distro-arch-series combinations.

Changed in software-center-agent:
assignee: nobody → Anthony Lenton (elachuni)
status: Confirmed → In Progress
Changed in software-center-agent:
status: In Progress → Fix Committed
description: updated
Dave Morley (davmor2)
Changed in software-center-agent:
status: Fix Committed → Fix Released
Dave Morley (davmor2)
Changed in software-center-agent:
milestone: none → 12.08
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.