[Pkg-debile-commits] [debile-master] 25/126: futzing
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:56:08 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 08a83a2081c4e5627da7ea8ee1e3ab7eccf77e23
Author: Paul Tagliamonte <tag at pault.ag>
Date: Sun May 26 15:49:16 2013 -0400
futzing
---
eg/config.json | 6 ++----
lucy/incoming.py | 10 +++++-----
lucy/models/binary.py | 13 ++++++++-----
lucy/models/job.py | 7 ++++---
4 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/eg/config.json b/eg/config.json
index 783085b..0a34f70 100644
--- a/eg/config.json
+++ b/eg/config.json
@@ -2,9 +2,6 @@
"configs": [
{
"_id": "default",
- "arches": [
- "amd64"
- ],
"incoming": "/srv/lucy.pault.ag/incoming",
"keyring": "/var/lib/lucy/keyring",
"job_classes": {
@@ -18,7 +15,8 @@
"desktop-file-validate",
"perlcritic",
"cppcheck",
- "pep8"
+ "pep8",
+ "amd64"
]
},
"pool": "/srv/lucy.pault.ag/pool",
diff --git a/lucy/incoming.py b/lucy/incoming.py
index 6ad50d9..f07efb8 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -73,21 +73,21 @@ def accept_binary(config, changes):
binaries = changes.get_files()
try:
- source = changes['x-lucy-source-package']
+ job = changes['x-lucy-job']
except KeyError:
- return reject(config, changes, 'no-source-package')
+ return reject(config, changes, 'no-job')
try:
- source = Source.load(source)
+ job = Job.load(source)
except KeyError:
- return reject(config, changes, 'invalid-source-package')
+ return reject(config, changes, 'invalid-job')
try:
buildd = Machine.get_by_key(key)
except KeyError:
return reject(config, changes, 'youre-not-a-machine')
- binary = Binary(source=source['_id'],
+ binary = Binary(job=job['_id'],
arch=arch,
suite=suite,
binaries=[os.path.basename(x) for x in binaries],
diff --git a/lucy/models/binary.py b/lucy/models/binary.py
index 27e625c..c3778df 100644
--- a/lucy/models/binary.py
+++ b/lucy/models/binary.py
@@ -1,15 +1,18 @@
from lucy.models import LucyObject
-from lucy.models.user import User
-from lucy.models.source import Source
class Binary(LucyObject):
_type = 'binaries'
- def __init__(self, source, arch, suite, binaries, builder, **kwargs):
- source = Source.load(source)['_id']
+ def __init__(self, job, arch, suite, binaries, builder, **kwargs):
+ from lucy.models.job import Job
+ job = Job.load(job)['_id']
+ if job['package_type'] != 'source':
+ raise ValueError("Package from Job isn't a source package")
- super(Binary, self).__init__(source=source,
+ source = job['package']
+
+ super(Binary, self).__init__(job=job,
arch=arch,
suite=suite,
builder=builder,
diff --git a/lucy/models/job.py b/lucy/models/job.py
index 9dca033..769d3dd 100644
--- a/lucy/models/job.py
+++ b/lucy/models/job.py
@@ -1,6 +1,3 @@
-from lucy.models.source import Source
-from lucy.models.binary import Binary
-from lucy.models.machine import Machine
from lucy.models import LucyObject
@@ -10,6 +7,10 @@ class Job(LucyObject):
def __init__(self, type, package, package_type, builder=None,
finished_at=None, assigned_at=None, **kwargs):
+ from lucy.models.source import Source
+ from lucy.models.binary import Binary
+ from lucy.models.machine import Machine
+
if package_type not in ["source", "binary"]:
raise ValueError("package_type needs to be binary or source")
--
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