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

Bug #833982 reported by Matthew Paul Thomas on 2011-08-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
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
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:
updated sources.list file:

$ apt-cache policy vendetta-online
  Version table:
 *** 0
        500 maverick/main amd64 Packages
        100 /var/lib/dpkg/status

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.

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
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
  * 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 to softwarecenter/ui/gtk3/
      as it belongs there and add to

  [ Michael Nelson ]
  * lp:~michael.nelson/software-center/833982-purchased-app-not-available,
    - 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  Edit
Everyone can see this information.

Other bug subscribers