[Pkg-debile-commits] [debile-master] 31/126: meh
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:56:09 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 914ca1147087c9499eac5b952e729a537e468bcf
Author: Paul Tagliamonte <tag at pault.ag>
Date: Sun May 26 23:28:04 2013 -0400
meh
---
eg/config.json | 9 +++++++--
lucy/models/__init__.py | 1 -
lucy/models/binary.py | 4 ++++
lucy/models/job.py | 7 +++++++
lucy/server.py | 11 ++++++++++-
5 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/eg/config.json b/eg/config.json
index eeabf3a..ea79aee 100644
--- a/eg/config.json
+++ b/eg/config.json
@@ -3,6 +3,12 @@
{
"_id": "default",
"incoming": "/srv/lucy.pault.ag/incoming",
+ "arches": [
+ "amd64"
+ ],
+ "suites": [
+ "unstable"
+ ],
"job_classes": {
"binary": [
"piuparts",
@@ -14,8 +20,7 @@
"desktop-file-validate",
"perlcritic",
"cppcheck",
- "pep8",
- "unstable-amd64"
+ "pep8"
]
},
"keyring": "/var/lib/lucy/keyring",
diff --git a/lucy/models/__init__.py b/lucy/models/__init__.py
index cbe3c00..8ae332e 100644
--- a/lucy/models/__init__.py
+++ b/lucy/models/__init__.py
@@ -47,7 +47,6 @@ class LucyObject(dict):
def query(cls, what):
table = _get_table(cls._type)
for x in table.find(what):
- print(x)
yield cls(**x)
@classmethod
diff --git a/lucy/models/binary.py b/lucy/models/binary.py
index 17ef45f..0ba93d5 100644
--- a/lucy/models/binary.py
+++ b/lucy/models/binary.py
@@ -19,3 +19,7 @@ class Binary(LucyObject):
builder=builder,
binaries=binaries,
**kwargs)
+
+ def get_source(self):
+ from lucy.models.source import Source
+ return Source.load(self['source'])
diff --git a/lucy/models/job.py b/lucy/models/job.py
index 48ab3c3..9cd64b8 100644
--- a/lucy/models/job.py
+++ b/lucy/models/job.py
@@ -23,6 +23,13 @@ class Job(LucyObject):
if builder:
builder = Machine.load(builder)['_id']
+ if type == 'build':
+ if 'arch' not in kwargs:
+ raise ValueError("Binary build but not target arch")
+
+ if 'suite' not in kwargs:
+ raise ValueError("Binary build but not target suite")
+
super(Job, self).__init__(
type=type,
package=package,
diff --git a/lucy/server.py b/lucy/server.py
index 4a81306..d22e652 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -1,4 +1,4 @@
-from lucy import Machine, Job, Source
+from lucy import Machine, Job, Source, Binary
from lucy.core import get_config
from xmlrpc.server import SimpleXMLRPCServer
@@ -75,6 +75,15 @@ class LucyInterface(object):
version=package['version'])
return url
+ def get_binary_base_url(self, package):
+ config = get_config()
+ package = Binary.load(package)
+ url = "{public}/{path}/{arch}".format(
+ public=config['public'],
+ path=package.get_source()['path'],
+ arch=package['arch'])
+ return url
+
def get_source(self, package):
return dict(Source.load(package))
--
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