for bn in binary_names:
if bn not in upload.changes.binary_names:
raise Reject('Package {0} is not mentioned in Binary field in changes'.format(bn))
- for bn in upload.changes.binary_names:
- if bn not in binary_names:
- raise Reject('Binary field in changes has {0}, but was not found in upload'.format(bn))
return True
if 'source' not in upload.changes.architectures:
raise Reject('DM uploads must include source')
- distributions = upload.changes.distributions
- for dist in distributions:
- if dist not in ('unstable', 'experimental', 'squeeze-backports'):
- raise Reject("Uploading to {0} is not allowed for DMs.".format(dist))
for f in upload.changes.files.itervalues():
if f.section == 'byhand' or f.section[:4] == "raw-":
raise Reject("Uploading byhand packages is not allowed for DMs.")
# Reject NEW packages
+ distributions = upload.changes.distributions
assert len(distributions) == 1
suite = session.query(Suite).filter_by(suite_name=distributions[0]).one()
overridesuite = suite
raise Reject('Unknown source_acl access level {0} for fingerprint {1}'.format(source_acl.access_level, fingerprint.fingerprint))
bin_architectures = set(upload.changes.architectures)
- bin_architectures.remove('source')
+ bin_architectures.discard('source')
binary_acl = fingerprint.binary_acl
if binary_acl is None:
if len(bin_architectures) > 0: