[Pkg-debile-commits] [debile-master] 19/26: Fixed duplicate move of binaries
Sylvestre Ledru
sylvestre at alioth.debian.org
Tue Aug 20 16:22:38 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository debile-master.
commit 4f71b89854cfdd64e8570dbf1954967e9f1fdb5a
Author: Léo Cavaillé <leo at cavaille.net>
Date: Thu Aug 15 10:56:10 2013 +0200
Fixed duplicate move of binaries
---
lucy/archive.py | 17 ++++++++---------
lucy/incoming.py | 2 +-
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/lucy/archive.py b/lucy/archive.py
index 3db567b..205eae6 100644
--- a/lucy/archive.py
+++ b/lucy/archive.py
@@ -20,18 +20,17 @@ def move_to_pool_source(package, changes, root=None):
dest = os.path.join(path, bn)
os.rename(entry, dest)
-def move_to_pool_binary(package, changes, root=None):
+def move_to_pool_binary(bfilename, root=None):
config = Config()
pool = config.get('paths', 'pool')
+ incoming = config.get('paths', 'incoming')
path = os.path.join(pool, str(package.source.package_id))
if root:
path = os.path.join(path, root)
- if os.path.exists(path):
- shutil.rmtree(path) # odd. very odd.
-
- os.makedirs(path)
- for entry in changes.get_files():
- bn = os.path.basename(entry)
- dest = os.path.join(path, bn)
- os.rename(entry, dest)
+ if not os.path.exists(path):
+ os.makedirs(path)
+
+ dest = os.path.join(path, bfilename)
+ source = os.path.join(incoming, bfilename)
+ os.rename(source, dest)
diff --git a/lucy/incoming.py b/lucy/incoming.py
index 1de58ec..f2857f9 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -200,7 +200,7 @@ def accept_binary(changes):
session.commit()
add_jobs(b)
- path = move_to_pool_binary(b, changes, root=arch)
+ path = move_to_pool_binary(bfilename, root=arch)
logging.info("Accepted binary package : %s / %s (%s/%s)",
b.name,
b.version,
--
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