X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Farchive.py;h=ef5fceb0da97b16da2bcac62cb289e576888af8e;hb=910b68e4cf176b824760bf3e572e893146d71116;hp=08f59883d06705c15507dde26c359c17c66a31aa;hpb=af69a21e4ac395e2f1ee467dbc6d9a76f6fcb64f;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index 08f59883..ef5fceb0 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -361,11 +361,7 @@ class ArchiveTransaction(object): # Uploaders are the maintainer and co-maintainers from the Uploaders field db_source.uploaders.append(maintainer) if 'Uploaders' in control: - def split_uploaders(field): - import re - for u in re.sub(">[ ]*,", ">\t", field).split("\t"): - yield u.strip() - + from daklib.textutils import split_uploaders for u in split_uploaders(control['Uploaders']): db_source.uploaders.append(get_or_set_maintainer(u, session)) session.flush() @@ -854,27 +850,32 @@ class ArchiveUpload(object): assert self.changes.valid_signature try: + # Validate signatures and hashes before we do any real work: for chk in ( checks.SignatureCheck, checks.ChangesCheck, - checks.TransitionCheck, - checks.UploadBlockCheck, checks.HashesCheck, checks.SourceCheck, checks.BinaryCheck, checks.BinaryTimestampCheck, - checks.ACLCheck, checks.SingleDistributionCheck, - checks.NoSourceOnlyCheck, - checks.LintianCheck, ): chk().check(self) final_suites = self._final_suites() if len(final_suites) == 0: - self.reject_reasons.append('Ended with no suite to install to.') + self.reject_reasons.append('No target suite found. Please check your target distribution and that you uploaded to the right archive.') return False + for chk in ( + checks.TransitionCheck, + checks.UploadBlockCheck, + checks.ACLCheck, + checks.NoSourceOnlyCheck, + checks.LintianCheck, + ): + chk().check(self) + for chk in ( checks.SourceFormatCheck, checks.SuiteArchitectureCheck, @@ -1027,8 +1028,9 @@ class ArchiveUpload(object): package, version, archext = parts arch, ext = archext.split('.', 1) - rule = automatic_byhand_packages.get(package) - if rule is None: + try: + rule = automatic_byhand_packages.subtree(package) + except KeyError: remaining.append(f) continue