Ansgar pushed to branch master at Debian FTP Team / dak
Commits:
4 changed files:
Changes:
... | ... | @@ -271,7 +271,7 @@ def accept(directory, upload): |
271 | 271 |
upload.transaction.fs, Logger)
|
272 | 272 |
|
273 | 273 |
accepted_to_real_suite = any(suite.policy_queue is None for suite in upload.final_suites)
|
274 |
- sourceful_upload = 'source' in upload.changes.architectures
|
|
274 |
+ sourceful_upload = upload.changes.sourceful
|
|
275 | 275 |
|
276 | 276 |
control = upload.changes.changes
|
277 | 277 |
if sourceful_upload and not Options['No-Action']:
|
... | ... | @@ -1140,7 +1140,7 @@ class ArchiveUpload(object): |
1140 | 1140 |
|
1141 | 1141 |
changelog_id = None
|
1142 | 1142 |
# Only add changelog for sourceful uploads and binNMUs
|
1143 |
- if 'source' in self.changes.architectures or re_bin_only_nmu.search(control['Version']):
|
|
1143 |
+ if self.changes.sourceful or re_bin_only_nmu.search(control['Version']):
|
|
1144 | 1144 |
query = 'INSERT INTO changelogs_text (changelog) VALUES (:changelog) RETURNING id'
|
1145 | 1145 |
changelog_id = session.execute(query, {'changelog': control['Changes']}).scalar()
|
1146 | 1146 |
assert changelog_id is not None
|
... | ... | @@ -261,9 +261,9 @@ class ChangesCheck(Check): |
261 | 261 |
if not re_field_package.match(bn):
|
262 | 262 |
raise Reject('{0}: Invalid binary package name {1}'.format(fn, bn))
|
263 | 263 |
|
264 |
- if 'source' in changes.architectures and changes.source is None:
|
|
264 |
+ if changes.sourceful and changes.source is None:
|
|
265 | 265 |
raise Reject("Changes has architecture source, but no source found.")
|
266 |
- if changes.source is not None and 'source' not in changes.architectures:
|
|
266 |
+ if changes.source is not None and not changes.sourceful:
|
|
267 | 267 |
raise Reject("Upload includes source, but changes does not say so.")
|
268 | 268 |
|
269 | 269 |
try:
|
... | ... | @@ -565,11 +565,11 @@ class SourceCheck(Check): |
565 | 565 |
|
566 | 566 |
def check(self, upload):
|
567 | 567 |
if upload.changes.source is None:
|
568 |
- if "source" in upload.changes.architectures:
|
|
568 |
+ if upload.changes.sourceful:
|
|
569 | 569 |
raise Reject("{}: Architecture field includes source, but no source package is included in the upload".format(upload.changes.filename))
|
570 | 570 |
return True
|
571 | 571 |
|
572 |
- if "source" not in upload.changes.architectures:
|
|
572 |
+ if not upload.changes.sourceful:
|
|
573 | 573 |
raise Reject("{}: Architecture field does not include source, but a source package is included in the upload".format(upload.changes.filename))
|
574 | 574 |
|
575 | 575 |
changes = upload.changes.changes
|
... | ... | @@ -721,7 +721,7 @@ class TransitionCheck(Check): |
721 | 721 |
"""check for a transition"""
|
722 | 722 |
|
723 | 723 |
def check(self, upload):
|
724 |
- if 'source' not in upload.changes.architectures:
|
|
724 |
+ if not upload.changes.sourceful:
|
|
725 | 725 |
return True
|
726 | 726 |
|
727 | 727 |
transitions = self.get_transitions()
|
... | ... | @@ -467,7 +467,7 @@ class Changes(object): |
467 | 467 |
return (
|
468 | 468 |
self.changes.get('Source'),
|
469 | 469 |
AptVersion(self.changes.get('Version', '')),
|
470 |
- 'source' not in self.architectures,
|
|
470 |
+ not self.sourceful,
|
|
471 | 471 |
self.filename
|
472 | 472 |
)
|
473 | 473 |
|