Merge lp:~jml/pkgme-devportal/binary-reasons into lp:pkgme-devportal
Status: | Merged |
---|---|
Approved by: | Jonathan Lange |
Approved revision: | 92 |
Merged at revision: | 84 |
Proposed branch: | lp:~jml/pkgme-devportal/binary-reasons |
Merge into: | lp:pkgme-devportal |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~jml/pkgme-devportal/binary-reasons |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby | Approve | ||
Review via email: mp+120750@code.launchpad.net |
Commit message
Give reasons for not wanting things. MetadataBackend now takes care of metadata file-related wants.
Description of the change
This branch started off by adding reasons for not wanting binaries. I then noticed the code was very similar to the PDF backend's code for not wanting PDFs, at least as far as metadata files went.
So, I've factored all the stuff about wanting things based on whether or not devportal-
I quite like this solution, as it makes MetadataBackend know everything about loading metadata, and allows subclasses to get on with their thing.
This builds on and supersedes lp:~jml/pkgme-devportal/do-not-want.
The attempt to merge lp:~jml/pkgme-devportal/binary-reasons into lp:pkgme-devportal failed. Below is the output from the failed tests.
./bin/py -m testtools.run devportalbinary .tests. test_suite
Tests running...
Ran 127 tests in 7.871s .acceptance. tests ======= ======= ======= ======= ======= ======= ======= ======= ======= .acceptance. tests.Acceptanc eTests. test_bundled_ library ------- ------- ------- ------- ------- ------- ------- ------- ------- y/acceptance/ tests/_ _init__ .py", line 74, in test_bundled_ library run_pkgme( test_data) y/acceptance/ tests/_ _init__ .py", line 44, in run_pkgme backend_ names=[ "binary" , "pdf"]) pkgme-0. 3-py2.7. egg/pkgme/ __init_ _.py", line 39, in write_packaging backend_ names=allowed_ backend_ names) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 82, in get_info_for get_info( path) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 344, in get_info eligible_ backends( path) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 328, in get_eligible_ backends pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 205, in want want_output( out) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 168, in _parse_want_output M/devportalbina ry/backends/ binary) returned invalid score from 'want' script: "{'reason': 'Has ELF binaries and a metadata file', 'score': 10}" ======= ======= ======= ======= ======= ======= ======= ======= ======= .acceptance. tests.Acceptanc eTests. test_gtk ------- ------- ------- ------- ------- ------- ------- ------- ------- y/acceptance/ tests/_ _init__ .py", line 66, in test_gtk run_pkgme( test_data) y/acceptance/ tests/_ _init__ .py", line 44, in run_pkgme backend_ names=[ "binary" , "pdf"]) pkgme-0. 3-py2.7. egg/pkgme/ __init_ _.py", line 39, in write_packaging backend_ names=allowed_ backend_ names) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 82, in get_info_for get_info( path) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 344, in get_info eligible_ backends( path) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 328, in get_eligible_ backends pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 205, in want want_output( out) pkgme-0. 3-py2.7. egg/pkgme/ backend. py", line 168, in _parse_want_output M/devportalbina ry/backends/ binary) returned invalid score from 'want' script: "{'reason': 'Has ELF b...
OK
./bin/py -m testtools.run devportalbinary
Tests running...
=======
ERROR: devportalbinary
-------
Traceback (most recent call last):
File "devportalbinar
self.
File "devportalbinar
test_data.path, allowed_
File "/tmp/eggs/
info = get_info_for(path, allowed_
File "/tmp/eggs/
return selector.
File "/tmp/eggs/
eligble = self.get_
File "/tmp/eggs/
score, reason = backend.want(path)
File "/tmp/eggs/
return self._parse_
File "/tmp/eggs/
"returned invalid score", str(result))
WantError: Backend binary (/tmp/tmpzGvT_
=======
ERROR: devportalbinary
-------
Traceback (most recent call last):
File "devportalbinar
self.
File "devportalbinar
test_data.path, allowed_
File "/tmp/eggs/
info = get_info_for(path, allowed_
File "/tmp/eggs/
return selector.
File "/tmp/eggs/
eligble = self.get_
File "/tmp/eggs/
score, reason = backend.want(path)
File "/tmp/eggs/
return self._parse_
File "/tmp/eggs/
"returned invalid score", str(result))
WantError: Backend binary (/tmp/tmpzGvT_