[Pkg-debile-commits] [debile-master] 35/126: needs more server

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:10 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 4c6041c09d59ea44eb35243e825c5438e0ae146e
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Mon May 27 22:01:36 2013 -0400

    needs more server
---
 lucy/server.py |   38 +++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/lucy/server.py b/lucy/server.py
index 160e642..1f0e096 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -10,6 +10,7 @@ import socketserver
 import threading
 
 NAMESPACE = threading.local()
+config = get_config()
 
 
 class LucyInterface(object):
@@ -19,35 +20,58 @@ class LucyInterface(object):
         Get the DB entry for the source package. Return None if it doesn't
         exist.
         """
-        pass
+        try:
+            return dict(Source.load(package))
+        except KeyError:
+            return None
 
     def get_binary_package(self, package):
         """
         Get the DB entry for the binary package. Return None if it doesn't
         exist.
         """
-        pass
+        try:
+            return dict(Binary.load(package))
+        except KeyError:
+            return None
 
     def get_dsc(self, package):
         """
         Get the .dsc path if the package is a valid source package. Otherwise
         return None.
         """
-        pass
+        public = config['public']
+        package = Source.load(package)
+        return "{public}/{pool}/{source}_{version}.dsc".format(
+            public=public,
+            pool=package['path'],
+            source=package['source'],
+            version=package['version']
+        )
 
-    def get_debs(self, package):
+    def get_deb_info(self, package):
         """
         Get a list of .debs for the given Binary package, otherwise None.
         """
-        pass
+        pkg = Binary.load(package)
+        source = pkg.get_source()
+        public = config['public']
+
+        root = "{public}/{pool}/{arch}".format(
+            public=public,
+            pool=source['path'],
+            arch=pkg['arch'],
+        )
+
+        return {"root": root, "packages": pkg['binaries']}
 
     #
 
-    def get_current_job(self):
+    def get_current_jobs(self):
         """
         Get the current job for the builder or return None.
         """
-        pass
+        return list(Job.assigned_jobs(get_builder_id()))
 
     def get_lint_job(self, types):
         """

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