No feedback when purchase in previous Ubuntu version isn't available for this version

Bug #833982 reported by Matthew Paul Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
High
Michael Nelson

Bug Description

software-center-gtk3 trunk r2212, Ubuntu Ocelot

1. In Ubuntu 11.04 or earlier, purchase an item in USC that isn't available for Ocelot.
2. Do a clean install of Ocelot.
3. Launch USC.
4. Choose "File" > "Reinstall Previous Purchases".
5. Select the item.
6. Choose "Install".

What happens:
* Nothing visible.
* At the terminal:
------------
2011-08-25 19:03:22,074 - softwarecenter.backend - ERROR - error in _on_trans_finished 'Error: Package does not exist
Check the spelling of the package name, and that the appropriate repository is enabled.

Package [dbus.String(u'vendetta-online')] isn't available'
2011-08-25 19:03:22,417 - softwarecenter.backend - WARNING - _on_trans_error: Transaction failed: None
 Package [dbus.String(u'vendetta-online')] isn't available
------------

What should happen: I hadn't specified this at all. But probably something like:
4. Any item that isn't available in this version of Ubuntu has a No symbol overlaid on the bottom left of its icon.
5. The "Install" button isn't present.
6. Clicking "More Info" takes you to a software item screen explaining that the item is not available for this version of Ubuntu, and that you should contact the vendor for an updated version.

#5 alone would be a minimal fix.

Notes for QA:
=============
See comment 1 for details of what happened when I originally tried to reproduce this in precice.

Until the corresponding fix for SCA is rolled out (bug 917109 - or until you test the client pointing to a different SCA instance supporting the fix), this branch should ensure that USC *won't* install the app from the incorrect distroseries - instead it will add a deb-line for precise and apt will fail if the package doesn't exist:
1) Purchase some apps on an oneiric system
2) On a precise system, click on Reinstall previous purchases
3) Click on more-info for an app
4) Click Install - verify that USC created the debline in your sources for precise, but the app will fail to install (unless it really exists in the given PPA for precise)

Once the fix for SCA is available, USC will not let the user click install if the app is not available for their current distroseries:
1-3) as above
4) Verify that there is no 'Install' button, and the package status line tells you that it is not available for the current Ubuntu version and to contact the vendor.

Related branches

Changed in software-center (Ubuntu):
importance: Undecided → High
tags: added: client-server
Changed in software-center (Ubuntu):
assignee: nobody → Michael Nelson (michael.nelson)
status: New → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote :

After fixing bug 917137 I'm now able to try reproducing this, but I get a different result:

At (6) when hitting the "Install" button, the application installs, even though it is not available for precise. Checking the sources.list file seems to indicate that USC enabled the *maverick* series and installed that.

software-center log: http://paste.ubuntu.com/808402/
updated sources.list file: http://paste.ubuntu.com/808403/

{{{
$ apt-cache policy vendetta-online
vendetta-online:
  Installed: 1.8.149.1-0ubuntu1
  Candidate: 1.8.149.1-0ubuntu1
  Version table:
 *** 1.8.149.1-0ubuntu1 0
        500 https://private-ppa.launchpad.net/commercial-ppa-uploaders/vendetta-online/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status
}}}

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

So, some pre-implementation thoughts for this bug.

The result shown in comment 1 above is because currently USC is adding the deb_line that was created with the original purchase - in my case, on maverick. So I assume we need to change that either way.

I can think of two ways to do this:

1) construct the deb_line for the current OS here, add the sources.list.d entry, apt-update and then use apt to determine if it's available, if not, UI as mpt's notes above, and (?) remove the sources.list.d entry
2) Update the agent as per bug 917109 so that when we get the users subscriptions, it'll include more info about the application, in particular, which distroseries are currently supported for the app, then we can give feedback in the UI straight away and not need to add a sources.list entry unnecessarily.

I'm assuming (2) is the way to go - I can do the server branch now (easy) and get going - but let me know if there are other approaches.

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

I agree, I think that (2) is really the best approach.

description: updated
Changed in software-center (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Gary Lasker (gary-lasker) wrote :

This bug was fixed in software-center 5.1.7 in Precise.

software-center (5.1.7) precise; urgency=low

  [ Anthony Lenton ]
  * lp:~elachuni/software-center/any-language:
    - add support to display reviews in any language
  * lp:~elachuni/software-center/reset-review-page:
    - Small bugfix to ensure that switching language or
      reviews sort method resets the reviews page, and
      added tests.
  * lp:~elachuni/software-center/relax-origin-distroseries:
    - provide "relaxed" mode for fetching reviews if the exact
      review matcher does not find anything (LP: #766951)
  * lp:~elachuni/software-center/disable-new-review:
    - This branch disables the "Submit a new review" button when
      you click it, and reenables it when the submit review dialog
      closes
  * lp:~elachuni/software-center/reviews-tests:
    - add several new tests for code in the review_gui_helper module

  [ Michael Vogt ]
  * lp:~mvo/software-center/improve-debug-in-piston-generic-helper:
    - improve debug output of piston-generic-helper and a README
      with examples how it can be used to debug server side issues
  * lp:~mvo/software-center/review-language-i18n:
    - make the language selection combo in the reviews widget
      nicer by adding a proper i18n name to it
  * lp:~mvo/software-center/trivial-move-gui-helpers:
    - move rnr_helpers.py to softwarecenter/ui/gtk3/review_gui_helper.py
      as it belongs there and add to POTFILE.in

  [ Michael Nelson ]
  * lp:~michael.nelson/software-center/833982-purchased-app-not-available,
    lp:~michael.nelson/software-center/917137-previous-purchases-empty-precise-2:
    - refactor/cleanup parser code and update for API 2.0 (LP: #917137)
  * lp:~michael.nelson/software-center/every-comm-app-already-purchased:
    - non-purchased apps should not have '(already purchased)'
      appended to name.
  * lp:~michael.nelson/software-center/833982-previous-purchase-no-feedback-really-this-time:
    - Implements the backend for bug 833982 so that a purchased application
      that is unsupported on the current system will be detected
  * lp:~michael.nelson/software-center/833982-previous-purchase-no-feedback-2:
    - ensure that the deb_line for the app points to the current distroseries

  [ Danny Tamez ]
  * lp:~zematynnad/software-center/rename_host_var_918270:
    - rename the env variable SOFTWARE_CENTER_BUY_HOST to the more
      correct SOFTWARE_CENTER_AGENT_HOST, but support the former as a
      fallback, update corresponding unit test (LP: #918270)
  * lp:~zematynnad/software-center/version_number_833877:
    - show version number of apps from the software-center-agent as
      well (LP: #833877)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/staging-certs-2:
    - add new SOFTWARE_CENTER_FORCE_DISABLE_CERTS_CHECK environment that
      can be used to disable cert checking to run e.g. against a local dev
      instance (LP: #918746)

 -- Michael Vogt <email address hidden> Tue, 24 Jan 2012 16:13:36 +0100

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
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.