Strip off Multi-Arch qualifiers in reverse dependency calculation

See also http://bugs.debian.org/794194
bzr-import-20160707
Martin Pitt 10 years ago
parent 89be9112d3
commit 0c64998e41

@ -238,7 +238,8 @@ def register_reverses(packages, provides, check_doubles=True, iterator=None,
# go through the list
for p in dependencies:
for a in p:
dep = a[0]
# strip off Multi-Arch qualifiers like :any or :native
dep = a[0].split(':')[0]
# register real packages
if dep in packages and (not check_doubles or pkg not in packages[dep][RDEPENDS]):
packages[dep][RDEPENDS].append(pkg)

@ -432,6 +432,21 @@ lightgreen 2 i386 lightgreen 2
self.assertEqual(self.pending_requests, '')
self.assertEqual(self.amqp_requests, set())
def test_multiarch_dep(self):
'''multi-arch dependency'''
self.data.add('rainbow', False, {'Depends': 'lightgreen:any'},
testsuite='autopkgtest')
self.do_test(
[('lightgreen', {'Version': '2'}, 'autopkgtest')],
# FIXME: while we only submit requests through AMQP, but don't consider
# their results, we don't expect this to hold back stuff.
VALID_CANDIDATE,
[r'\blightgreen\b.*>1</a> to .*>2<',
r'autopkgtest for lightgreen 2: .*amd64.*in progress.*i386.*in progress',
r'autopkgtest for rainbow 1: .*amd64.*in progress.*i386.*in progress'])
def test_no_amqp_config(self):
'''Run without autopkgtest requests'''

Loading…
Cancel
Save