Crashes on launch if /etc/lsb-release is missing

Bug #1020038 reported by Matthew Paul Thomas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

software-center trunk r3054, Ubuntu 12.04

1. sudo mv /etc/lsb-release /etc/lsb-release.backup
2. software-center
3. sudo mv /etc/lsb-release /etc/lsb-release.backup # IMPORTANT to restore your system

What happens:
2. ------------
ERROR:root:DebFileApplication import
Traceback (most recent call last):
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/db/__init__.py", line 4, in <module>
    from debfile import DebFileApplication, DebFileOpenError
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/db/debfile.py", line 25, in <module>
    from softwarecenter.db.application import Application, AppDetails
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/db/application.py", line 27, in <module>
    import softwarecenter.distro
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/distro/__init__.py", line 194, in <module>
    distro_instance = _get_distro()
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/distro/__init__.py", line 171, in _get_distro
    distro_class = getattr(module, distro_id)
AttributeError: 'module' object has no attribute 'debian'
INFO:softwarecenter:Using data (UI, xapian) from current dir
2012-07-02 11:46:49,094 - softwarecenter - INFO - Using data (UI, xapian) from current dir
Traceback (most recent call last):
  File "./software-center", line 144, in <module>
    from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/ui/gtk3/app.py", line 51, in <module>
    from softwarecenter.db.application import Application
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/db/application.py", line 27, in <module>
    import softwarecenter.distro
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/distro/__init__.py", line 194, in <module>
    distro_instance = _get_distro()
  File "/home/mpt/hacking/software-center/trunk/softwarecenter/distro/__init__.py", line 171, in _get_distro
    distro_class = getattr(module, distro_id)
AttributeError: 'module' object has no attribute 'debian'
------------

Fixing this bug may also fix bug 982370.

Revision history for this message
Robert Roth (evfool) wrote :

Setting this to Confirmed, as I can reproduce using the steps described above, but set the Priority to Low, as this should not be a common issue on the distributions software-center currently works on, as lsb-release should exist by default (I thinkg the use rmight have some more serious trouble than software-center doesn't start if it does not exist)
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Michael Vogt (mvo) wrote :

Hm, is this a valid issue? /etc/lsb-release is part of base-files which in turn is:

Package: base-files
Essential: yes
Priority: required

So all systems should have that. Or am I missing something here?

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

I don't see how /etc/lsb-release being part of a package is relevant to the steps to reproduce. Yes, if the file is missing then something has gone wrong on the system. But how would someone learn what the problem was?

I understand that crashing invisibly would be the only option if, say, Python was missing. Or GTK. Or maybe even WebKit. But not a data file. If it's unreasonable to run USC without that file, then don't just crash, show an error message.

Revision history for this message
Prx (info-productivix) wrote :

Yes , I have the same problem with TV 8.0.17147 and asked the TV support to react on this situation.

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.