[Pkg-debile-commits] [debile-master] 08/28: Really implemented the processing of incoming sources

Léo Cavaillé leo.cavaille-guest at alioth.debian.org
Wed Aug 21 13:36:50 UTC 2013


This is an automated email from the git hooks/post-receive script.

leo.cavaille-guest pushed a commit to branch master
in repository debile-master.

commit d9c14c4a188c4c991df96a9e23daf836132c2d2c
Author: Léo Cavaillé <leo at cavaille.net>
Date:   Fri Aug 16 23:44:18 2013 +0200

    Really implemented the processing of incoming sources
---
 lucy/incoming.py |   25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/lucy/incoming.py b/lucy/incoming.py
index 550cdc7..a6d807b 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -23,15 +23,13 @@ def process():
     pcf = lambda x: parse_changes_file(x, incoming)
     session = Session()
     users = session.query(User).all()
+    # Loop on all users
+    # See UserRepository documentation for path composition
     for u in users:
-        with cd(os.path.join(incoming,u.login)):
+        # Process source incoming
+        with cd(os.path.join(incoming,u.login, 'source')):
             for changes in fglob("*changes", pcf):
-                try:
-                    changes.validate()
-                except ChangesFileException:
-                    reject(changes, "invalid")
-                    continue
-                accept(changes, u)
+                accept_source(changes, u)
 
 
 def accept(changes, user):
@@ -51,7 +49,18 @@ def accept(changes, user):
 
 def accept_source(changes, user):
     session = Session()
-    key = changes.validate_signature()
+    try:
+        changes.validate()
+    except ChangesFileException:
+        return reject(changes, "invalid")
+
+    try:
+        key = changes.validate_signature()
+    except ChangesFileException:
+        return reject(changes, "invalid-signature")
+
+    if not changes.is_source_only_upload():
+        return reject(changes, "not-only-sourceful")
 
     try:
         owner = session.query(User).filter(User.gpg_fingerprint == key).one()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git



More information about the Pkg-debile-commits mailing list