Merge lp://staging/~brian-murray/apport/bug-1336062 into lp://staging/~apport-hackers/apport/trunk
Status: | Merged |
---|---|
Merged at revision: | 2818 |
Proposed branch: | lp://staging/~brian-murray/apport/bug-1336062 |
Merge into: | lp://staging/~apport-hackers/apport/trunk |
Diff against target: |
90 lines (+31/-29) 2 files modified
backends/packaging-apt-dpkg.py (+29/-29) test/test_backend_apt_dpkg.py (+2/-0) |
To merge this branch: | bzr merge lp://staging/~brian-murray/apport/bug-1336062 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt (community) | Approve | ||
Review via email: mp+226380@code.staging.launchpad.net |
Description of the change
This is pretty well documented in the attached bug report. I've chosen to test this by pretending that '/bin/true' is provided by mypackage. If we are using the cache from the sandbox then the test will pass, if not the test will fail with the following message.
$ PYTHON=python3 test/run backend_
Testing local source tree.
Running pep8...
Running pyflakes...
--- Testing backend_
test_get_
get_file_package() on uninstalled packages. ... FAIL
=======
FAIL: test_get_
get_file_package() on uninstalled packages.
-------
Traceback (most recent call last):
File "test/test_
self.
AssertionError: 'coreutils' != 'mypackage'
- coreutils
+ mypackage
-------
Ran 1 test in 4.107s
FAILED (failures=1)
Thanks Brian, nice catch! I un-indented the moved code block again (as "return" doesn't need an else branch) to make the diff easier to read.