From 012bc01c113c8d008a0eb94219f1cb519519ff0d Mon Sep 17 00:00:00 2001
From: Simon Lejeune <sle@openerp.com>
Date: Thu, 18 Sep 2014 11:23:40 +0200
Subject: [PATCH] [FIX] Package: Debian: finally a correct Packages generation

---
 setup/package.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup/package.py b/setup/package.py
index e3952073ad1a..4e2016db2f72 100755
--- a/setup/package.py
+++ b/setup/package.py
@@ -103,7 +103,8 @@ def publish(o, releases):
         if release_extension == 'deb':
             temp_path = tempfile.mkdtemp(suffix='debPackages')
             system(['cp', release_path, temp_path])
-            subprocess.Popen('dpkg-scanpackages . /dev/null | gzip -9c > %s' % join(o.pub, 'deb', 'Packages.gz'), shell=True, cwd=temp_path)
+            with open(os.path.join(o.pub, 'deb', 'Packages'), 'w') as out:
+                subprocess.call(['dpkg-scanpackages', '.'], stdout=out, cwd=temp_path)
             shutil.rmtree(temp_path)
 
         # Latest/symlink handler
-- 
GitLab