Support archive.canonical.com and for-pay as origin

Bug #731376 reported by Michael Vogt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ratings and Reviews server
Fix Released
Medium
Michael Nelson
software-center (Ubuntu)
Fix Released
Medium
Michael Vogt
Natty
Fix Released
Medium
Michael Vogt

Bug Description

For natty final we want to support archive.canonical.com, extras.ubuntu.com and the for-pay origins (in addition to the "regular" origin).

To do that the server needs to be extended to support this, the client already sends along the origin information that it gets from the archive release file (in lowercase) when submitting a review.

E.g.:
- archive.ubuntu.com its "ubuntu" (http://archive.ubuntu.com/dists/natty/Release)
- archive.canonical.com its "canonical" (http://archive.canonical.com/dists/natty/Release)
- extras.ubuntu.com its "lp-ppa-app-review-board" (http://extras.ubuntu.com/ubuntu/dists/maverick/Release)
- a PPA its "lp-ppa-mvo" (http://ppa.launchpad.net/mvo/ppa/ubuntu/dists/lucid/Release)
- a private PPA its e.g. lp-ppa-commercial-ppa-uploaders-vendetta-online (https://private-ppa.launchpad.net/commercial-ppa-uploaders/vendetta-online/ubuntu/dists/maverick/Release)

The client will use the origin information to get reviews as well. It will have to special case the software-center-agent ones
and add something like:
    origin = "lp-ppa-%s" % item.archive_id.replace("/", "-")
to get the origin for the agent.

QA Notes:
Currently this is difficult to QA as there are no for-pay apps for natty yet. To trick USC you need to update (1) your sources.list entry for the archive you are testing (either a for-pay private ppa, or archive.canonical.com), and then (2) update DISTRIB_CODENAME to 'maverick' in /etc/lsb-release, then (3) `sudo apt-get update`, and run software center.
 1) Select 'More info' for the for-pay app (or partner app) that you have installed
 2) Write a review and verify it submits successfully, and displays in the UI
 3) Remember to revert the changes to your sources.list and /etc/lsb-release

Cheated, I had uplink installed on maverick so I use SC trunk and filed a review from there on Uplink.

Related branches

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

Software-center needs to grow code to get the origin for software-center-agent items

Michael Vogt (mvo)
Changed in software-center (Ubuntu Natty):
status: New → Fix Committed
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → Medium
Revision history for this message
Michael Vogt (mvo) wrote :

Looking at the origin it seems like a problem is where to split the string to figure out the archive_id. I.e. "Origin: LP-PPA-app-review-board" is actually app-review-board/ubuntu and for something like "LP-PPA-team-name-with-repo-name" its hard to know what is the team name and what is the repo name.

description: updated
description: updated
description: updated
tags: added: kb-improvement
Changed in rnr-server:
importance: Undecided → Medium
Changed in rnr-server:
assignee: nobody → Michael Nelson (michael.nelson)
status: New → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Have I understood correctly that the 'origin', as it appears in the Releases file, is *not* unique? That is, I could have:

username=one-two
ppa = three-four

and

username=one-two-three
ppa = four

and
username = one-two-three-four
ppa = ppa (default)

and all of these would have the origin: 'lp-ppa-one-two-three-four'?

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Actually, do we need to depend on the name in the Releases? If the client knows the PPA name/username, can we encode that in the origin for PPAs?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 3.1.23.2

---------------
software-center (3.1.23.2) natty; urgency=low

  [ Michael Vogt]
  * merged lp:~mmcg069/software-center/little-catview-cleanups
  * merged lp:~mmcg069/software-center/stars-visual-tweaks
  * softwarecenter/db/database.py, test/test_appstore.py:
    - fix locking and add regression test, thanks to Matthew McGowan
      for the research into this
  * softwarecenter/db/reviews.py:
    - fix support for reviews in not enabled PPAs (like for-pay PPAs)
      LP: #731376
  * softwarecenter/backend/rnrclient_pristine.py:
    - updated to match latest upstream version
  * data/ui/submit_review.ui, data/ui/report_abuse.ui:
    - set softwarecenter icon (thanks to davmor2 for reporting)
  * softwarecenter/db/update.py:
    - add "translated" argument to the parser and store untranslated
      name as well and store untranslated value in the DB
  * softwarecenter/db/application.py:
    - add get_untranslated_app() call
  * softwarecenter/db/reviews.py:
    - when talking to the rnr-server, always use the untranslated names

  [ Kiwinote ]
  * clean up mimetype handling (allows us to accept apturls once again)
  * softwarecenter/backend/channel.py:
    - don't return two copies of one channel with different names
    - channel query is based on XOO rather than XOL
  * softwarecenter/backend/restfulclient.py:
    - import time on demand, this avoids an attribute error
  * softwarecenter/db/application.py:
    - avoid using unicode(None)
  * softwarecenter/view/softwarepane.py:
    - revert to correct sortmode once searchterm has been cleared

  [ Aaron Peachey ]
  * softwarecenter/db/reviews.py:
    - add functionality to keep track of review usefulness votes locally
  * softwarecenter/view/widgets/reviews.py:
    - different behaviour for review display if user has already
      votedon usefulness (LP: #730768)

  [ Gary Lasker ]
  * test/test_unity_launcher_integration.py:
    - add unit test for Unity launcher integration feature
 -- Michael Vogt <email address hidden> Fri, 11 Mar 2011 18:53:22 +0100

Changed in software-center (Ubuntu Natty):
status: Fix Committed → Fix Released
Changed in rnr-server:
status: In Progress → Fix Committed
Revision history for this message
Michael Nelson (michael.nelson) wrote :

QA Notes:
I have fluendo-dvd installed, but am on natty. There is no natty version published in the ppa, when clicking on "Be the first to review" I would see only: "The origin of the application can not be detected. Entering a review is not possible".

With mvo's suggestion, I temporarily updated my sources.list to say maverick (for this ppa), apt-get updated, and then retried. This allowed me to write a new review, but the client must be sending the real distroseries when submitting the review, as the response coming back from the server was: "package fluendo-dvd not in lp-ppa-commercial-ppa-uploaders-fluendo-dvd natty for natty" (which is expected).

I can verify that the reviews server is aware of the sca packages with:

{{{
>>> from reviewsapp.utilities import WebServices
>>> ws = WebServices()
>>> ws.get_sca_publishings_for('maverick', 'i386')
{'lp-ppa-commercial-ppa-uploaders-world-of-goo': 'worldofgoo', 'lp-ppa-commercial-ppa-uploaders-illumination': 'illumination', 'lp-ppa-commercial-ppa-uploaders-crossover-standard': 'crossover-standard', 'lp-ppa-commercial-ppa-uploaders-brukkon': 'brukkon', 'lp-ppa-commercial-ppa-uploaders-fluendo-plugins': 'gstreamer0.10-fluendo-plugins', 'lp-ppa-commercial-ppa-uploaders-fluendo-dvd': 'fluendo-dvd', 'lp-ppa-commercial-ppa-uploaders-crossover-pro': 'crossover-pro', 'lp-ppa-commercial-ppa-uploaders-vendetta-online': 'vendetta-online', 'lp-ppa-commercial-ppa-uploaders-fluendo-wmv-plugins': 'gstreamer0.10-fluendo-plugins-wmv'}
>>> ws.get_sca_publishings_for('natty', 'i386')
{}
>>> ws.get_sca_publishings_for('natty', 'i386')
{}
>>> ws.get_sca_publishings_for('maverick', 'i386')
{'lp-ppa-commercial-ppa-uploaders-world-of-goo': 'worldofgoo', 'lp-ppa-commercial-ppa-uploaders-fluendo-plugins': 'gstreamer0.10-fluendo-plugins', 'lp-ppa-commercial-ppa-uploaders-crossover-standard': 'crossover-standard', 'lp-ppa-commercial-ppa-uploaders-brukkon': 'brukkon', 'lp-ppa-commercial-ppa-uploaders-illumination': 'illumination', 'lp-ppa-commercial-ppa-uploaders-fluendo-dvd': 'fluendo-dvd', 'lp-ppa-commercial-ppa-uploaders-crossover-pro': 'crossover-pro', 'lp-ppa-commercial-ppa-uploaders-vendetta-online': 'vendetta-online', 'lp-ppa-commercial-ppa-uploaders-fluendo-wmv-plugins': 'gstreamer0.10-fluendo-plugins-wmv'}
>>> ws.get_sca_publishings_for('maverick', 'i386')
{'lp-ppa-commercial-ppa-uploaders-world-of-goo': 'worldofgoo', 'lp-ppa-commercial-ppa-uploaders-fluendo-plugins': 'gstreamer0.10-fluendo-plugins', 'lp-ppa-commercial-ppa-uploaders-crossover-standard': 'crossover-standard', 'lp-ppa-commercial-ppa-uploaders-brukkon': 'brukkon', 'lp-ppa-commercial-ppa-uploaders-illumination': 'illumination', 'lp-ppa-commercial-ppa-uploaders-fluendo-dvd': 'fluendo-dvd', 'lp-ppa-commercial-ppa-uploaders-crossover-pro': 'crossover-pro', 'lp-ppa-commercial-ppa-uploaders-vendetta-online': 'vendetta-online', 'lp-ppa-commercial-ppa-uploaders-fluendo-wmv-plugins': 'gstreamer0.10-fluendo-plugins-wmv'}
}}}

Revision history for this message
Michael Nelson (michael.nelson) wrote :

I could not get verify using partner either, as all the "Canonical" items in USC simply say "Not found" when I click on more info.

I also tried reviewing the google talk plugin which I have installed, and saw that first, when USC requested reviews for google talk, it received:

ValidationException: Argument 'origin' must match pattern '[0-9a-z+-.:/]+$'

and when submitting the review:
"errors": {"__all__": [": package google-talkplugin not in google, inc. natty for natty"]}

Looking at the code for the server, this suggests the server is validating the following info:

package_name: "google-talkplugin"
origin: "google, inc."
distroseries: "natty"
arch_tag: "natty"

description: updated
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Verified this on the daily server using the above QA instructions. I reviewed fluendo-dvd which I have installed:

http://184.82.116.62/reviews/api/1.0/reviews/filter/en/lp-ppa-commercial-ppa-uploaders-fluendo-dvd/any/any/fluendo-dvd/

and Adobe reader from Canonical Partner:

http://184.82.116.62/reviews/api/1.0/reviews/filter/en/canonical/any/any/acroread/

These should now show up for others viewing the daily rnr server.

description: updated
Revision history for this message
Michael Nelson (michael.nelson) wrote :

I also tested a review of an app in extras by, in addition to the above setup for QA, adding an /etc/apt/sources.list.d/extras.list with

deb http://extras.ubuntu.com/ubuntu maverick main

and re-running `sudo apt-get update`. When running USC, an extra software category "Independent" is available with the software "Suspended Sentence".

I was then able to install and review it successfully:

http://184.82.116.62/reviews/api/1.0/reviews/filter/en/lp-ppa-app-review-board/any/any/suspended-sentence/

Dave Morley (davmor2)
description: updated
Changed in rnr-server:
status: Fix Committed → Fix Released
Changed in rnr-server:
milestone: none → 11.03
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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