[Pkg-debile-commits] [debile-master] 10/126: meh

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:06 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 5371e02c92ae0fcb1593a548a0018b3e1106e785
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Wed May 22 19:40:53 2013 -0400

    meh
---
 eg/config.json |    3 ++-
 lucy/core.py   |   11 +++++++++++
 lucy/server.py |   12 ++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/eg/config.json b/eg/config.json
index 8aa2018..f3980c3 100644
--- a/eg/config.json
+++ b/eg/config.json
@@ -7,7 +7,8 @@
                 "source",
                 "amd64"
             ],
-            "pool": "/srv/lucy.pault.ag/pool"
+            "pool": "/srv/lucy.pault.ag/pool",
+            "public": "http://localhost/pool"
         }
     ],
     "machines": [
diff --git a/lucy/core.py b/lucy/core.py
index ed5b7c7..da12f28 100644
--- a/lucy/core.py
+++ b/lucy/core.py
@@ -3,3 +3,14 @@ from pymongo import Connection
 
 connection = Connection('localhost', 27017)
 db = connection.lucy
+config = None
+
+
+def get_config():
+    global config
+    if config:
+        return config
+
+    from lucy.models.config import Config
+    config = Config.load('default')
+    return config
diff --git a/lucy/server.py b/lucy/server.py
index dfaa3e6..15e153b 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -1,6 +1,8 @@
+from lucy.models.package import Package
 from lucy.models.machine import Machine
 from lucy.models.report import Report
 from lucy.models.job import Job
+from lucy.core import get_config
 
 from xmlrpc.server import SimpleXMLRPCServer
 from xmlrpc.server import SimpleXMLRPCRequestHandler
@@ -51,6 +53,16 @@ class LucyInterface(object):
     def identify(self):
         return get_builder_id()
 
+    def get_dsc_url(self, package):
+        config = get_config()
+        package = Package.load(package)
+        url = "{public}/{path}/{source}_{version}.dsc".format(
+            public=config['public'],
+            path=package['path'],
+            source=package['source'],
+            version=package['version'])
+        return url
+
     def get_next_job(self, job_type):
         ajobs = list(Job.assigned_jobs(get_builder_id()))
         if ajobs != []:

-- 
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