mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-12 10:11:34 +00:00
sources is a proper class with a version method
Thank nthykier
This commit is contained in:
parent
c7107d1fd4
commit
5dfde99fe6
@ -30,7 +30,6 @@ import apt_pkg
|
|||||||
|
|
||||||
import britney2.hints
|
import britney2.hints
|
||||||
from britney2.policies.policy import BasePolicy, PolicyVerdict
|
from britney2.policies.policy import BasePolicy, PolicyVerdict
|
||||||
from britney2.consts import VERSION
|
|
||||||
|
|
||||||
|
|
||||||
EXCUSES_LABELS = {
|
EXCUSES_LABELS = {
|
||||||
@ -354,7 +353,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
if re.match('gcc-\d$', src):
|
if re.match('gcc-\d$', src):
|
||||||
for test in ['binutils', 'fglrx-installer', 'libreoffice', 'linux']:
|
for test in ['binutils', 'fglrx-installer', 'libreoffice', 'linux']:
|
||||||
try:
|
try:
|
||||||
tests.append((test, self.britney.sources['testing'][test][VERSION]))
|
tests.append((test, self.britney.sources['testing'][test].version))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# no package in that series? *shrug*, then not (mostly for testing)
|
# no package in that series? *shrug*, then not (mostly for testing)
|
||||||
pass
|
pass
|
||||||
@ -408,7 +407,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
rdep_src_info = sources_info[rdep_src]
|
rdep_src_info = sources_info[rdep_src]
|
||||||
if 'autopkgtest' in rdep_src_info.testsuite or self.has_autodep8(rdep_src_info, binaries_info):
|
if 'autopkgtest' in rdep_src_info.testsuite or self.has_autodep8(rdep_src_info, binaries_info):
|
||||||
if rdep_src not in reported_pkgs:
|
if rdep_src not in reported_pkgs:
|
||||||
tests.append((rdep_src, rdep_src_info[VERSION]))
|
tests.append((rdep_src, rdep_src_info.version))
|
||||||
reported_pkgs.add(rdep_src)
|
reported_pkgs.add(rdep_src)
|
||||||
|
|
||||||
for tdep_src in self.britney.testsuite_triggers.get(binary.package_name, set()):
|
for tdep_src in self.britney.testsuite_triggers.get(binary.package_name, set()):
|
||||||
@ -420,7 +419,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
if 'autopkgtest' in tdep_src_info.testsuite or self.has_autodep8(tdep_src_info, binaries_info):
|
if 'autopkgtest' in tdep_src_info.testsuite or self.has_autodep8(tdep_src_info, binaries_info):
|
||||||
for pkg_id in tdep_src_info.binaries:
|
for pkg_id in tdep_src_info.binaries:
|
||||||
if pkg_id.architecture == arch:
|
if pkg_id.architecture == arch:
|
||||||
tests.append((tdep_src, tdep_src_info[VERSION]))
|
tests.append((tdep_src, tdep_src_info.version))
|
||||||
reported_pkgs.add(tdep_src)
|
reported_pkgs.add(tdep_src)
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -433,10 +432,10 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
for pkg_id in srcinfo.binaries:
|
for pkg_id in srcinfo.binaries:
|
||||||
if pkg_id.architecture == arch and '-image' in pkg_id.package_name:
|
if pkg_id.architecture == arch and '-image' in pkg_id.package_name:
|
||||||
try:
|
try:
|
||||||
tests.append((pkg, self.britney.sources['unstable'][pkg][VERSION]))
|
tests.append((pkg, self.britney.sources['unstable'][pkg].version))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
tests.append((pkg, self.britney.sources['testing'][pkg][VERSION]))
|
tests.append((pkg, self.britney.sources['testing'][pkg].version))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# package not in that series? *shrug*, then not
|
# package not in that series? *shrug*, then not
|
||||||
pass
|
pass
|
||||||
@ -721,7 +720,7 @@ class AutopkgtestPolicy(BasePolicy):
|
|||||||
check_passed_testing = False
|
check_passed_testing = False
|
||||||
tested_in_testing = False
|
tested_in_testing = False
|
||||||
try:
|
try:
|
||||||
src_ver_in_testing = self.britney.sources['testing'][src][VERSION]
|
src_ver_in_testing = self.britney.sources['testing'][src].version
|
||||||
except KeyError:
|
except KeyError:
|
||||||
src_ver_in_testing = None
|
src_ver_in_testing = None
|
||||||
for srcmap in self.test_results.values():
|
for srcmap in self.test_results.values():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user