mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 23:38:20 +00:00
Fix review issues.
This commit is contained in:
parent
80bf9060de
commit
f32907acea
@ -60,7 +60,7 @@ class Excuse(object):
|
||||
self.deps = {}
|
||||
self.sane_deps = []
|
||||
self.break_deps = []
|
||||
self.unsat_deps = {}
|
||||
self.unsat_deps = defaultdict(set)
|
||||
self.bugs = []
|
||||
self.newbugs = set()
|
||||
self.oldbugs = set()
|
||||
@ -126,10 +126,7 @@ class Excuse(object):
|
||||
|
||||
def add_unsatisfiable_dep(self, signature, arch):
|
||||
"""Add an unsatisfiable dependency"""
|
||||
if arch not in self.unsat_deps:
|
||||
self.unsat_deps[arch] = []
|
||||
if signature not in self.unsat_deps[arch]:
|
||||
self.unsat_deps[arch].append(signature)
|
||||
self.unsat_deps[arch].add(signature)
|
||||
|
||||
def invalidate_dep(self, name):
|
||||
"""Invalidate dependency"""
|
||||
@ -266,11 +263,7 @@ class Excuse(object):
|
||||
if break_deps:
|
||||
dep_data['unimportant-dependencies'] = sorted(break_deps)
|
||||
if self.unsat_deps:
|
||||
dep_data['unsatisfiable-dependencies'] = unsatisfiable = {}
|
||||
for arch in self.unsat_deps:
|
||||
unsatisfiable[arch] = []
|
||||
for sig in self.unsat_deps[arch]:
|
||||
unsatisfiable[arch].append("%s" % sig)
|
||||
dep_data['unsatisfiable-dependencies'] = self.unsat_deps
|
||||
if self.needs_approval:
|
||||
status = 'not-approved'
|
||||
for h in self.hints:
|
||||
|
@ -81,7 +81,6 @@ class YamlTest(TestBase):
|
||||
do = time.time() - (60 * 60 * 24 * daysold)
|
||||
f.write('%s %s %d' % (pkg, fields['Version'], do))
|
||||
|
||||
|
||||
# Set up sourceppa cache for testing
|
||||
sourceppa_path = os.path.join(self.data.dirs[True], 'SourcePPA')
|
||||
with open(sourceppa_path, 'w', encoding='utf-8') as sourceppa:
|
||||
@ -124,7 +123,7 @@ class YamlTest(TestBase):
|
||||
6)
|
||||
|
||||
excuse = self.do_test([pkg])
|
||||
self.assertIn('datefudge', excuse['libc6']['dependencies']['unsatisfiable-dependencies']['amd64'][0])
|
||||
self.assertIn('datefudge', list(excuse['libc6']['dependencies']['unsatisfiable-dependencies']['amd64'])[0])
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user