X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=68a882f85d9ac2dc2d98280e78e840aa9d46c46a;hb=d80d1f9473ed63a08404a23c04a9d8eabedc76a6;hp=690c1c115e19a51f66f29244b09c33e6bb8d0684;hpb=8441f90de1fa8d30f92bf3c6b433b31f91db6d7e;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 690c1c11..68a882f8 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -997,7 +997,7 @@ def check_timestamps(): ################################################################################ def lookup_uid_from_fingerprint(fpr): - q = Upload.projectB.query("SELECT u.uid, u.name FROM fingerprint f, uid u WHERE f.uid = u.id AND f.fingerprint = '%s'" % (fpr)) + q = Upload.projectB.query("SELECT u.uid, u.name, u.debian_maintainer FROM fingerprint f, uid u WHERE f.uid = u.id AND f.fingerprint = '%s'" % (fpr)) qs = q.getresult() if len(qs) == 0: return (None, None) @@ -1007,7 +1007,7 @@ def lookup_uid_from_fingerprint(fpr): def check_signed_by_key(): """Ensure the .changes is signed by an authorized uploader.""" - (uid, uid_name) = lookup_uid_from_fingerprint(changes["fingerprint"]) + (uid, uid_name, is_dm) = lookup_uid_from_fingerprint(changes["fingerprint"]) if uid_name == None: uid_name = "" @@ -1017,8 +1017,8 @@ def check_signed_by_key(): may_nmu, may_sponsor = 1, 1 # XXX by default new dds don't have a fingerprint/uid in the db atm, # and can't get one in there if we don't allow nmu/sponsorship - elif uid[:3] == "dm:": - uid_email = uid[3:] + elif is_dm is "t": + uid_email = uid may_nmu, may_sponsor = 0, 0 else: uid_email = "%s@debian.org" % (uid) @@ -1045,6 +1045,7 @@ def check_signed_by_key(): source_ids = [] check_suites = changes["distribution"].keys() if "unstable" not in check_suites: check_suites.append("unstable") + if "experimental" not in check_suites: check_suites.append("experimental") for suite in check_suites: suite_id = database.get_suite_id(suite) q = Upload.projectB.query("SELECT s.id FROM source s JOIN src_associations sa ON (s.id = sa.source) WHERE s.source = '%s' AND sa.suite = %d" % (changes["source"], suite_id)) @@ -1053,8 +1054,7 @@ def check_signed_by_key(): is_nmu = 1 for si in source_ids: - is_nmu = 1 - q = Upload.projectB.query("SELECT m.name FROM maintainer m WHERE m.id IN (SELECT maintainer FROM src_uploaders WHERE src_uploaders.source = %s)" % (si)) + q = Upload.projectB.query("SELECT m.name FROM maintainer m WHERE m.id IN (SELECT su.maintainer FROM src_uploaders su JOIN source s ON (s.id = su.source) WHERE su.source = %s AND s.dm_upload_allowed = 'yes')" % (si)) for m in q.getresult(): (rfc822, rfc2047, name, email) = utils.fix_maintainer(m[0]) if email == uid_email or name == uid_name: