deauthorize does not remove sources.list

Bug #723911 reported by Michael Vogt
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Triaged
Medium
Unassigned
Natty
Invalid
Low
Unassigned
software-center (Ubuntu)
Triaged
Medium
Unassigned
Natty
Invalid
Low
Unassigned

Bug Description

Binary package hint: software-center

When deauthorize my computer is used the packages are removed but the sources.list entries are not removed. This functionality is currently disabled in Software Center, and can be re-enabled once this is fixed.

More details on deauthorization functionality can be found in the Software Center specification:

  https://wiki.ubuntu.com/SoftwareCenter#Deauthorizing%20your%20computer

Michael Vogt (mvo)
Changed in software-center (Ubuntu Natty):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-11.04-beta-1
assignee: nobody → Gary Lasker (gary-lasker)
Changed in software-center (Ubuntu Natty):
milestone: ubuntu-11.04-beta-1 → ubuntu-11.04
Changed in software-center (Ubuntu Natty):
status: Triaged → In Progress
Changed in aptdaemon (Ubuntu Natty):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Gary Lasker (gary-lasker)
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

What exactly do you need from aptdaemon?

description: updated
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Sebastian, please accept my apologies for not providing more details on this earlier. The change in aptdaemon is needed for the deauthorization functionality in Software Center. The feature is very specific to purchased software only, and is defined in the specification here:

  https://wiki.ubuntu.com/SoftwareCenter#Deauthorizing%20your%20computer

We don't expect deauthorization to be used very often at all, but nevertheless it's an important feature to make available. The idea is that a person may want to clear his Ubuntu SSO credentials and all purchased applications from their computer, say, for when they are giving their computer to a relative or a friend. Currently, Software Center does all the steps listed above, but it needs to do one additional thing and that is to also clear the sources themselves that are related to the purchased software items.

Since Software Center can't directly modify items in the sources directories, it seems the proper place for this functionality is in aptdaemon itself. In fact, the capability needed in aptdaemon could be considered the reverse of "add_repository". This is shaping up as a simple change in reality, and quite low-risk indeed, as it will require the addition of a simple new call that Software Center can make. I've done what I think is the majority of the work in aptdaemon already in my branch (which I have just attached to this bug):

  lp:~gary-lasker/aptdaemon/remove-repository-lp723911

Basically, I created a new method called "remove_repository", and modeled it after "add_repository". However, it is much simpler than "remove_repository" in that its single purpose is to remove the specified sources file.

My plan is to finish this code today in both the Software Center and aptdaemon sides, and of course to test it thoroughly. mvo is aware that this work is happening and I am hoping that, between all of us, we can coordinate this for merging on both the software-center and aptdaemon sides for beta-2 freeze on Monday.

I hope that answers your questions adequately. Please let me know if you have any other questions. I will append more to this bug as I progress with the work today (I have at least one other bug, that has appeared recently, that I am working on as well).

Thank you, Sebastian!

Best regards,
Gary

Changed in aptdaemon (Ubuntu Natty):
milestone: none → ubuntu-11.04
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Since we actually will need to ability to remove multiple sources, I've modified the aptdaemon code in my branch to take a list of source files in sources.list.d, and renamed the method from "remove_repository" to "remove_sources", with the needed supporting changes elsewhere in the code. Please see my branch from details:

  lp:~gary-lasker/aptdaemon/remove-repository-lp723911

Changed in aptdaemon (Ubuntu Natty):
milestone: ubuntu-11.04 → natty-updates
Changed in software-center (Ubuntu Natty):
milestone: ubuntu-11.04 → natty-updates
Changed in aptdaemon (Ubuntu Natty):
importance: High → Medium
Changed in software-center (Ubuntu Natty):
importance: High → Medium
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi again Sebastian, in conversation with mvo he feels and I agree that we'd prefer not to make this change so close to release after all. For one thing, it seems like with a bit more time and in consultation with you we may be able to provide a more generally useful capability in aptdaemon than the current "remove_sources" as it stands, which implements what is really a very narrow use case for a feature in Software Center that will probably be used very rarely anyway (deauthorizing a computer for purchases). In addition, this change would require a string freeze exception for the status update strings for from aptdaemon, and it's quite late for that.

With the deauthorize feature as it currently stands in Software Center, the Ubuntu SSO credentials are removed and all purchased software is uninstalled, and this meets the requirements of the spec. The clearing of the sources.list is just needed to remove all trace of the purchased repositories themselves, but again, since this will very likely be a rarely used feature it's not a big problem that we don't remove them for now. Certainly it doesn't justify the risk of changing these two packages at this stage in the cycle.

Therefore, I have retargeted this bug for natty-updates and we can consider this for an SRU. We will also want to add a target for Oneiric so we can track it there as well.

Meanwhile, let's have a conversation, perhaps at UDS if I will see you there, about what kind of implementation would have the most benefit for aptdaemon.

Thanks again!
Gary

Revision history for this message
Gary Lasker (gary-lasker) wrote :

I've disabled the deauthorization option in Software Center for now. This will be restored once the remove repository support in aptdaemon becomes available.

Changed in aptdaemon (Ubuntu Natty):
status: In Progress → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  [ Michael Vogt ]
  * softwarecenter/db/reviews.py:
    - do not crash on multiple origins for the same version
      (LP: #756415)
  * softwarecenter/db/application.py:
    - ensure docid is updated on database reopen() (LP: #757054)
  * softwarecenter/models/appstore.py:
    - refresh docids in active searches if the database is reopend
      (LP: #710920)
  * softwarecenter/backend/aptd.py:
    - do not run update-apt-xapian-index in --update mode to avoid
      in-place database modfications (LP: #507836)
  * test/test_load_icons.py:
    - add test for the icon loader
  * merged lp:~glatzor/software-center/force-bad-quality, this
    fixes the missing ability to override the lintian warning
    (LP: #712377)
  * don't show reviews if we can't determine the origin
  * fix crash when enabling new components (LP: #636429)
  * fix missing details when a channel or a component just got added

  [ Gary Lasker ]
  * softwarecenter/app.py:
    - temporarily disable the deauth option until we have support
      for remove repository in aptdaemon (see LP: #723911)
  * softwarecenter/backend/aptd.py :
    - fix empty error dialog for the case where aptdaemon returns
      an error code with no value (LP: #747172)
    - fix intermittent crash when updating the a-x-i (LP: #657494)
  * softwarecenter/models/viewswitcherlist.py:
    - mark string "In Progress..." for translation, many thanks to
      Hendrik Knackstedt and Florian Greinus for finding this
      (LP: #759240)
  * softwarecenter/view/catview_gtk.py:
    - fix broken translation string (LP: #758656)
  * refresh .pot file
  * softwarecenter/db/update.py:
    - fix crash when reinstalling previous purchases (LP: #760353)
 -- Michael Vogt <email address hidden> Thu, 14 Apr 2011 19:59:42 +0200

Changed in software-center (Ubuntu Natty):
status: In Progress → Fix Released
Changed in software-center (Ubuntu Natty):
status: Fix Released → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Gary for the update. So it seems for a Natty SRU this is merely a "nice to have", downgrading priority. The oneiric task should probably continue to be "medium", though.

Changed in software-center (Ubuntu Natty):
importance: Medium → Low
Changed in aptdaemon (Ubuntu Natty):
importance: Medium → Low
Changed in aptdaemon (Ubuntu Natty):
status: Triaged → Fix Released
Changed in aptdaemon (Ubuntu):
status: Triaged → Fix Released
description: updated
Changed in aptdaemon (Ubuntu):
status: Fix Released → Triaged
Changed in aptdaemon (Ubuntu Natty):
status: Fix Released → Triaged
Changed in software-center (Ubuntu):
importance: Low → Medium
Changed in aptdaemon (Ubuntu):
importance: Low → Medium
milestone: natty-updates → oneiric-alpha-3
Changed in software-center (Ubuntu):
milestone: natty-updates → oneiric-alpha-3
Changed in software-center (Ubuntu):
status: In Progress → Triaged
Changed in software-center (Ubuntu Natty):
status: In Progress → Triaged
Changed in aptdaemon (Ubuntu):
status: Triaged → In Progress
Changed in aptdaemon (Ubuntu):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
Changed in software-center (Ubuntu):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
Changed in software-center (Ubuntu):
status: Triaged → In Progress
Changed in aptdaemon (Ubuntu):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
Changed in software-center (Ubuntu):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
description: updated
Changed in aptdaemon (Ubuntu):
milestone: ubuntu-11.10-beta-2 → none
Changed in software-center (Ubuntu):
milestone: ubuntu-11.10-beta-2 → none
Changed in software-center (Ubuntu):
status: In Progress → Triaged
Changed in aptdaemon (Ubuntu):
status: In Progress → Triaged
Changed in aptdaemon (Ubuntu Natty):
milestone: natty-updates → none
Changed in software-center (Ubuntu Natty):
milestone: natty-updates → none
Changed in aptdaemon (Ubuntu Natty):
status: Triaged → Invalid
Changed in software-center (Ubuntu Natty):
status: Triaged → Invalid
assignee: Gary Lasker (gary-lasker) → nobody
Changed in software-center (Ubuntu):
assignee: Gary Lasker (gary-lasker) → nobody
Changed in aptdaemon (Ubuntu Natty):
assignee: Gary Lasker (gary-lasker) → nobody
Changed in aptdaemon (Ubuntu):
assignee: Gary Lasker (gary-lasker) → nobody
Changed in software-center (Ubuntu):
assignee: nobody → Gary Lasker (gary-lasker)
importance: Medium → Low
Changed in aptdaemon (Ubuntu):
assignee: nobody → Gary Lasker (gary-lasker)
importance: Medium → Low
Revision history for this message
Michael Vogt (mvo) wrote :

With the new "/etc/apt/auth.conf" this is more important nowdays as its not longer obvious that cleaning sources.list is enough.

Changed in software-center (Ubuntu):
importance: Low → Medium
Changed in aptdaemon (Ubuntu):
importance: Low → Medium
Changed in aptdaemon (Ubuntu):
assignee: Gary Lasker (gary-lasker) → nobody
Changed in software-center (Ubuntu):
assignee: Gary Lasker (gary-lasker) → nobody
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.