[Pkg-debile-commits] [debile-master] 64/126: feh

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:16 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 cb5ad02093a4662b6af1590be699687385e41dc9
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Sun Jun 2 11:39:41 2013 -0400

    feh
---
 lucy/archive.py       |   10 ----------
 lucy/incoming.py      |    5 ++++-
 lucy/models/source.py |    3 ++-
 lucy/server.py        |    5 ++---
 4 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/lucy/archive.py b/lucy/archive.py
index a8a4959..eb24008 100644
--- a/lucy/archive.py
+++ b/lucy/archive.py
@@ -26,14 +26,4 @@ def move_to_pool(config, package, changes, root=None):
         bn = os.path.basename(entry)
         dest = os.path.join(path, bn)
         os.rename(entry, dest)
-        if entry.endswith(".dsc"):
-            guessed_name = "{source}_{version}.dsc".format(
-                source=changes['source'],
-                version=changes['version'],
-            )
-            guessed_path = os.path.join(path, guessed_name)
-            if not os.path.exists(guessed_path):
-                dest = os.path.abspath(dest)
-                os.symlink(dest, guessed_path)
-
     return ret
diff --git a/lucy/incoming.py b/lucy/incoming.py
index f0710d6..1a86f14 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -46,9 +46,12 @@ def accept_source(config, changes):
     except KeyError:
         return reject(changes, config, 'bad-user-account')
 
+    dsc = changes.get_dsc()
+
     obj = Source(source=changes['source'],
                  version=changes['version'],
-                 owner=who['_id'])
+                 owner=who['_id'],
+                 dsc=dsc)
     obj.save()
 
     path = move_to_pool(config, obj['_id'], changes)
diff --git a/lucy/models/source.py b/lucy/models/source.py
index 9e444b5..8be1b11 100644
--- a/lucy/models/source.py
+++ b/lucy/models/source.py
@@ -7,11 +7,12 @@ import lucy.core
 class Source(LucyObject):
     _type = 'sources'
 
-    def __init__(self, source, version, owner, **kwargs):
+    def __init__(self, source, version, owner, dsc, **kwargs):
         owner = User.load(owner)['_id']
         super(Source, self).__init__(source=source,
                                      version=version,
                                      owner=owner,
+                                     dsc=dsc,
                                      **kwargs)
 
 
diff --git a/lucy/server.py b/lucy/server.py
index 99e38f3..738f3cb 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -45,11 +45,10 @@ class LucyInterface(object):
         """
         public = config['public']
         package = Source.load(package)
-        return "{public}/{pool}/{source}_{version}.dsc".format(
+        return "{public}/{pool}/{dsc}".format(
             public=public,
             pool=package['path'],
-            source=package['source'],
-            version=package['version'],
+            dsc=package['dsc'],
         )
 
     def get_deb_info(self, 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