[Pkg-debile-commits] [debile-master] 13/28: Fixed the reprepro source processing
Léo Cavaillé
leo.cavaille-guest at alioth.debian.org
Wed Aug 21 13:36:51 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 f263a9b38bc5f2bf21467078b9954b2103acd6ef
Author: Léo Cavaillé <leo at cavaille.net>
Date: Sat Aug 17 08:31:31 2013 +0200
Fixed the reprepro source processing
---
lucy/archive.py | 8 ++++++++
lucy/incoming.py | 11 ++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/lucy/archive.py b/lucy/archive.py
index e786116..10a9f8e 100644
--- a/lucy/archive.py
+++ b/lucy/archive.py
@@ -66,6 +66,14 @@ class UserRepository:
def add_source(self, source):
dsc = os.path.join(self.incoming_path, 'source', source.dsc)
+ print ([
+ 'reprepro',
+ '-b', os.path.join(self.pool_path, 'source'),
+ 'includedsc',
+ 'sid',
+ dsc
+ ])
+
out, err, ret = run_command([
'reprepro',
'-b', os.path.join(self.pool_path, 'source'),
diff --git a/lucy/incoming.py b/lucy/incoming.py
index 5981e4b..377706e 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -1,6 +1,6 @@
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
from lucy.orm import User, Source, Machine, Binary, Job, Group
-from lucy.archive import move_to_pool_source, move_to_pool_binary
+from lucy.archive import move_to_pool_source, move_to_pool_binary, UserRepository
from lucy.changes import parse_changes_file, ChangesFileException
from lucy.utils import cd, fglob
@@ -11,6 +11,7 @@ from lucy.server import Session
import os
import logging
import uuid
+import datetime as dt
def listize(entry):
items = [x.strip() for x in entry.split(",")]
@@ -50,12 +51,14 @@ def accept(changes, user):
def accept_source(changes, user):
session = Session()
try:
+ print "Source acceptance : validating the .changes file"
changes.validate()
except ChangesFileException:
return reject(changes, "invalid")
try:
key = changes.validate_signature()
+ print "Source acceptance : validating the .changes signature"
except ChangesFileException:
return reject(changes, "invalid-signature")
@@ -64,9 +67,13 @@ def accept_source(changes, user):
try:
owner = session.query(User).filter(User.gpg_fingerprint == key).one()
+ print "Source acceptance : debile user matching the .changes PGP signature = %s (%s)" % (owner.login, owner.name)
except NoResultFound:
+ print "Source acceptance : no debile user matching the .changes PGP signature"
return reject(changes, 'bad-user-account')
+ # FIXME: suite
+ print "Source acceptance : suite = %s" % changes['Distribution']
if changes['Distribution'] != 'unstable':
return reject(changes, 'source-not-unstable')
@@ -75,6 +82,7 @@ def accept_source(changes, user):
group = None
if 'X-Lucy-Group' in changes:
group = Group(name=changes['X-Lucy-Group'])
+ print "Source acceptance : detected group = %s" % group.name
# Check if previous runs happened before on this version
previous_runs = [ e[0] for e in session.query(Source.run)\
@@ -85,6 +93,7 @@ def accept_source(changes, user):
.all()]
if previous_runs:
run_nb = max(previous_runs) + 1
+ print "Source acceptance : previous uploads of this package were made, this is run %s" % str(run_nb)
else:
run_nb = 1
--
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