Crashes when "For Purchase" apps have been installed

Bug #843002 reported by Michael Terry
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
the python apt bindings
Opinion
Undecided
Unassigned
ubuntuone-installer
Fix Released
High
dobey
apt (Ubuntu)
Opinion
Undecided
Unassigned
software-center (Ubuntu)
New
Undecided
Unassigned
ubuntuone-installer (Ubuntu)
Fix Released
High
dobey

Bug Description

To test:
1) Install a For Purchase app from the software center
2) Enter a Guest Session
3) Run ubuntuone-installer

You will see something like the following:

guest-ywuCAB@tambo:~$ ubuntuone-installer
Traceback (most recent call last):
  File "/usr/bin/ubuntuone-installer", line 31, in <module>
    if is_installed('ubuntuone-control-panel-gtk'):
  File "/usr/bin/ubuntuone-installer", line 26, in is_installed
    cache = apt.Cache()
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 93, in __init__
    self.open(progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 140, in open
    self._list.read_main_list()
SystemError: E:Opening /etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa-uploaders_braid_ubuntu.list - ifstream::ifstream (13: Permission denied)

Related branches

Revision history for this message
dobey (dobey) wrote :

Curious. What are the permissions on that list file?

Do you get a similar problem if you run 'apt-cache policy braid' as a regular user, for example?

Revision history for this message
Michael Terry (mterry) wrote :

I feel like I've filed a bug about this before, maybe on python-apt or something. The permissions are that only root can read it (which is how software-center sets things up, as the file contains your special access key).

I remember the bug I filed being marked won't fix by upstream. They seemed to think it was a crazy config. I can't find the bug now.

Revision history for this message
dobey (dobey) wrote :

It seems like if python-apt is going to support users not being able to read certain files, it should handle them gracefully instead of raising an error and not letting the apt.Cache API be usable at all.

I'll work around this by adding a fallback in ubuntuone-installer, but I'm also adding python-apt to this task, as it needs to handle this gracefully.

dobey (dobey)
Changed in ubuntuone-installer:
assignee: nobody → Rodney Dawes (dobey)
importance: Undecided → High
status: New → In Progress
Changed in ubuntuone-installer (Ubuntu):
assignee: nobody → Rodney Dawes (dobey)
importance: Undecided → High
status: New → In Progress
milestone: none → ubuntu-11.10-beta-2
Changed in ubuntuone-installer:
status: In Progress → Fix Committed
dobey (dobey)
Changed in ubuntuone-installer:
milestone: none → 1.7.4
dobey (dobey)
Changed in ubuntuone-installer:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-installer - 1.7.4-0ubuntu1

---------------
ubuntuone-installer (1.7.4-0ubuntu1) oneiric; urgency=low

  * New upstream release.
    - Work around apt.Cache crash with unreadable sources (LP: #843002)
    - Mark strings for translation in the UI (LP: #849408)
    - Install more of the Ubuntu One packages (LP: #840072)
 -- Rodney Dawes <email address hidden> Wed, 14 Sep 2011 17:32:14 -0400

Changed in ubuntuone-installer (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Julian Andres Klode (juliank) wrote :

We cannot do anything about this in python-apt. APT generates the errors, and that's correct anyway.

Changed in python-apt:
status: New → Incomplete
status: Incomplete → Opinion
affects: python-apt (Ubuntu) → apt (Ubuntu)
Changed in apt (Ubuntu):
status: New → Opinion
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.