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