mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-07-04 13:01:29 +00:00
Re-fix merging of source packages
We need complete copies of the SourcePackage objects, as we might later find some binaries which are only in unstable. Traceback (most recent call last): File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3290, in <module> Britney().main() File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3261, in main self.write_excuses() File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1963, in write_excuses if should_upgrade_srcarch(pkg, arch, 'unstable'): File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1534, in should_upgrade_srcarch False) File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 2294, in _compute_groups if binaries_t[parch][0][binary].source != source_name: KeyError: 'kicad'
This commit is contained in:
parent
2e3a6c2cdb
commit
eac1bf30a9
@ -188,6 +188,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import optparse
|
import optparse
|
||||||
|
import copy
|
||||||
|
|
||||||
import apt_pkg
|
import apt_pkg
|
||||||
|
|
||||||
@ -1040,9 +1041,11 @@ class Britney(object):
|
|||||||
"""Merge sources from `source' into partial suite `target'."""
|
"""Merge sources from `source' into partial suite `target'."""
|
||||||
source_sources = self.sources[source]
|
source_sources = self.sources[source]
|
||||||
target_sources = self.sources[target]
|
target_sources = self.sources[target]
|
||||||
|
# we need complete copies here, as we might later find some binaries
|
||||||
|
# which are only in unstable
|
||||||
for pkg, value in source_sources.items():
|
for pkg, value in source_sources.items():
|
||||||
if pkg not in target_sources:
|
if pkg not in target_sources:
|
||||||
target_sources[pkg] = value
|
target_sources[pkg] = copy.deepcopy(value)
|
||||||
|
|
||||||
def merge_binaries(self, source, target, arch):
|
def merge_binaries(self, source, target, arch):
|
||||||
"""Merge `arch' binaries from `source' into partial suite `target'."""
|
"""Merge `arch' binaries from `source' into partial suite `target'."""
|
||||||
|
@ -873,6 +873,21 @@ class T(TestBase):
|
|||||||
self.assertEqual(self.pending_requests, {})
|
self.assertEqual(self.pending_requests, {})
|
||||||
self.assertEqual(self.amqp_requests, set())
|
self.assertEqual(self.amqp_requests, set())
|
||||||
|
|
||||||
|
def test_same_version_binary_in_unstable(self):
|
||||||
|
'''binary from new architecture in unstable with testing version'''
|
||||||
|
|
||||||
|
# i386 is in testing already, but amd64 just recently built and is in unstable
|
||||||
|
self.data.add_src('brown', False, {'Testsuite': 'autopkgtest'})
|
||||||
|
self.data.add('brown', False, {'Architecture': 'i386'}, add_src=False)
|
||||||
|
self.data.add('brown', True, {'Architecture': 'amd64'}, add_src=False)
|
||||||
|
|
||||||
|
exc = self.do_test(
|
||||||
|
# we need some other package to create unstable Sources
|
||||||
|
[('lightgreen', {'Version': '2'}, 'autopkgtest')],
|
||||||
|
{'brown': (True, {})}
|
||||||
|
)[1]
|
||||||
|
self.assertEqual(exc['brown']['item-name'], 'brown/amd64')
|
||||||
|
|
||||||
def test_package_pair_running(self):
|
def test_package_pair_running(self):
|
||||||
'''Two packages in unstable that need to go in together (running)'''
|
'''Two packages in unstable that need to go in together (running)'''
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user