ubuntu-bug crashes when there's no sources.list

Bug #1342429 reported by Robin Sheat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ ubuntu-bug apport

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
Traceback (most recent call last):
  File "/usr/bin/apport-cli", line 365, in <module>
    if not app.run_argv():
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 554, in run_argv
    return self.run_report_bug()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 359, in run_report_bug
    self.collect_info(symptom_script)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 874, in collect_info
    icthread.exc_raise()
  File "/usr/lib/python2.7/dist-packages/apport/REThread.py", line 34, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 74, in thread_collect_info
    report.add_package_info(package)
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 219, in add_package_info
    version = packaging.get_version(package)
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 92, in get_version
    pkg = self._apt_pkg(package)
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 85, in _apt_pkg
    return self._cache()[package]
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 53, in _cache
    self._apt_cache = apt.Cache(progress, rootdir='/')
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 101, in __init__
    self._check_and_create_required_dirs(rootdir)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 131, in _check_and_create_required_dirs
    open(rootdir + f, "w").close()
IOError: [Errno 13] Permission denied: '//etc/apt/sources.list'

If I run it with sudo, then it makes a zero-byte sources.list file. The reason we don't have a sources.list is that puppet manages the files in /etc/apt/sources.list.d according to the needs of the server.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apport 2.0.1-0ubuntu17.6
ProcVersionSignature: Ubuntu 3.8.0-42.63~precise1-generic 3.8.13.23
Uname: Linux 3.8.0-42-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
CrashReports: 640:3276:106:13876:2014-07-16 11:35:09.958702133 +1200:2014-07-16 11:35:09.958702133 +1200:/var/crash/_usr_bin_apport-bug.3276.crash
Date: Wed Jul 16 11:46:54 2014
MarkForUpload: True
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Robin Sheat (eythian) wrote :
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in apport (Ubuntu):
status: New → Incomplete
Revision history for this message
Robin Sheat (eythian) wrote :

This is still a bug in a supported version.

robin@taniwha:/etc/apt$ sudo mv sources.list sources.list.bak
[sudo] wachtwoord voor robin:
robin@taniwha:/etc/apt$ ubuntu-bug apport
Gtk-Message: 11:56:56.196: GtkDialog mapped without a transient parent. This is discouraged.

[... displays the message in the attached screenshot ...]

robin@taniwha:/etc/apt$ sudo mv sources.list.bak sources.list
robin@taniwha:/etc/apt$ ubuntu-bug apport

[... proceeds to collect data like normal ...]

robin@taniwha:/etc/apt$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

Changed in apport (Ubuntu):
status: Incomplete → New
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Thanks for the update Robin.

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.