apport-retrace uses system package lists which may return a different source package for a binary
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Undecided
|
Brian Murray |
Bug Description
I was trying to retrace a whoopsie crash from Utopic and ran into the following error:
ubuntu@
duction/
WARNING: /usr/lib/
WARNING: /usr/lib/
WARNING: /usr/lib/
WARNING: /lib/arm-
WARNING: /usr/lib/
Installing extra package whoopsie to get ExecutablePath
E: Ignore unavailable version '0.2.33' of package 'whoopsie'
E: Unable to find a source package for whoopsie-daisy
I'm guessing its because the whoopsie package changed names from precise to trusty and apport does a source package look up in the host (not sandbox) environment.
Related branches
- Martin Pitt (community): Approve
-
Diff: 90 lines (+31/-29)2 files modifiedbackends/packaging-apt-dpkg.py (+29/-29)
test/test_backend_apt_dpkg.py (+2/-0)
Changed in apport (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Brian Murray (brian-murray) |
summary: |
- apport-retrace on precise confused by source package name changing + apport-retrace uses system package lists which may return a different + source package for a binary |
This simple change to a test will exhibit the cause of the failure:
$ bzr diff test/test_ backend_ apt_dpkg. py backend_ apt_dpkg. py' backend_ apt_dpkg. py 2014-04-30 14:27:45 +0000 backend_ apt_dpkg. py 2014-07-10 19:34:40 +0000
self. assertEqual( impl.get_ file_package( '/bin/bash' ), 'bash')
self. assertEqual( impl.get_ file_package( '/bin/cat' ), 'coreutils')
self. assertEqual( impl.get_ file_package( '/etc/blkid. tab'), 'libblkid1') l(impl. get_file_ package( '/usr/bin/ whoopsie' ), 'whoopsie-daisy')
self. assertEqual( impl.get_ file_package( '/nonexisting' ), None)
=== modified file 'test/test_
--- test/test_
+++ test/test_
@@ -168,6 +168,7 @@
+ self.assertEqua
def test_get_ file_package_ uninstalled( self):
Running the test on a 14.04 system fails (this is the opposite of the description where retracing failed on a 12.04 system because we were trying to install whoopsie-daisy in a Utopic sandbox but the cause is the same) with the following error:
$ PYTHON=python3 test/run backend_ apt_dpkg. test_get_ file_package apt_dpkg. test_get_ file_package --- file_package (__main__.T)
Testing local source tree.
Running pep8...
Running pyflakes...
--- Testing backend_
test_get_
get_file_package() on installed files. ... FAIL
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= file_package (__main__.T) ------- ------- ------- ------- ------- ------- ------- ------- ------- backend_ apt_dpkg. py", line 171, in test_get_ file_package assertEqual( impl.get_ file_package( '/usr/bin/ whoopsie' ), 'whoopsie-daisy')
FAIL: test_get_
get_file_package() on installed files.
-------
Traceback (most recent call last):
File "test/test_
self.
AssertionError: 'whoopsie' != 'whoopsie-daisy'
- whoopsie
+ whoopsie-daisy
? ++++++
This is because get_file_package first checks in '/var/lib/ dpkg/info/ *.list' and returns information from the host system and not in map_cachedir.