From 7be582947b25b12e15e44b96f1b108d15a538e6d Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 5 Nov 2018 21:01:10 +0100 Subject: [PATCH] Prevent processing an upload without dsc file --- bin/debexpo_importer.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/debexpo_importer.py b/bin/debexpo_importer.py index 3688e2f5..203f8d4b 100755 --- a/bin/debexpo_importer.py +++ b/bin/debexpo_importer.py @@ -406,13 +406,21 @@ class Importer(object): # invalid, we don't know whom send it to self._reject("Your changes file appears invalid. Refusing your upload\n%s" % (str(e))) - - # Determine user from changed-by field # This might be temporary, the GPG check should replace the user later # At this stage it is only helpful to get an email address to send blame mails to self._determine_uploader() + # Checks whether the upload has a dsc file + if not self.changes.get_dsc(): + self._reject("Rejecting incomplete upload.\nYou did not upload the" + " dsc file\nMake sure you include the full source" + " (if you are using sbuild make sure to use the" + " --source option or the equivalent configuration" + " item; if you are using dpkg-buildpackage directly" + " use the default flags or -S for a source only" + " upload)") + # Next, find out whether the changes file was signed with a valid signature, if not reject immediately if not self.skip_gpg: if not signature.is_signed(self.changes_file): -- GitLab