[Pkg-debile-commits] [debile-master] 53/126: update to match ethel
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:56:13 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch scan-build-html
in repository debile-master.
commit 4cc9b72745e8715ba10f12eae912f2a74925bdc0
Author: Paul Tagliamonte <tag at pault.ag>
Date: Fri May 31 19:28:55 2013 -0400
update to match ethel
---
eg/config.json | 4 +++-
lucy/incoming.py | 16 ++++++++++++++--
lucy/models/machine.py | 8 +++++++-
lucy/server.py | 1 +
4 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/eg/config.json b/eg/config.json
index 23264e2..6b8fa05 100644
--- a/eg/config.json
+++ b/eg/config.json
@@ -17,7 +17,9 @@
"desktop-file-validate",
"perlcritic",
"cppcheck",
- "pep8"
+ "pep8",
+ "lintian",
+ "lintian4py"
]
},
"keyring": "/var/lib/lucy/keyring",
diff --git a/lucy/incoming.py b/lucy/incoming.py
index 2bfac1f..f0710d6 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -68,8 +68,8 @@ def add_jobs(package, package_type, config, klass, changes):
for type in config['job_classes'][klass]:
if klass == 'source':
- suite = None
- arch = None
+ suite = "unstable"
+ arch = "all"
else:
suite = package['suite']
arch = package['arch']
@@ -97,6 +97,18 @@ def accept_binary(config, changes):
key = changes.validate_signature()
arch = changes['Architecture']
+ if " " in arch:
+ arches = set(arch.split(" "))
+ if "all" in arches:
+ arches.remove("all")
+
+ arches = list(arches)
+ if len(arches) != 1:
+ return reject(config, changes, 'too-many-arches')
+
+ arch = changes._data['Architecture'] = arches[0]
+
+
suite = changes['Distribution']
binaries = changes.get_files()
diff --git a/lucy/models/machine.py b/lucy/models/machine.py
index 471dc0e..aefc997 100644
--- a/lucy/models/machine.py
+++ b/lucy/models/machine.py
@@ -1,16 +1,18 @@
from lucy.models import LucyObject
from lucy.models.user import User
+import datetime as dt
class Machine(LucyObject):
_type = 'machines'
- def __init__(self, _id, owner, auth, **kwargs):
+ def __init__(self, _id, owner, auth, last_ping=None, **kwargs):
owner = User.load(owner)['_id']
super(Machine, self).__init__(_id=_id,
owner=owner,
auth=auth,
+ last_ping=last_ping,
**kwargs)
def auth(self, auth):
@@ -19,3 +21,7 @@ class Machine(LucyObject):
@classmethod
def get_by_key(cls, key):
return cls.single({"gpg": key})
+
+ def ping(self):
+ self['last_ping'] = dt.datetime.utcnow()
+ self.save()
diff --git a/lucy/server.py b/lucy/server.py
index faec284..2594b7d 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -155,6 +155,7 @@ class LucyAuthMixIn(SimpleXMLRPCRequestHandler):
machine = Machine.load(machine)
if machine.auth(password):
NAMESPACE.machine = machine
+ machine.ping()
return True
NAMESPACE.machine = None
return False
--
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