[OE-core] [PATCH 21/33] package_manager/deb: create Packages.xz

Andreas Oberritter obi at opendreambox.org
Tue Dec 6 11:49:39 UTC 2016


apt-get prefers it over Packages.gz.

Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
---
 meta/lib/oe/package_manager.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 12dff20..b18148b 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -304,6 +304,7 @@ class DpkgIndexer(Indexer):
 
         apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
         gzip = bb.utils.which(os.getenv('PATH'), "gzip")
+        xz = bb.utils.which(os.getenv('PATH'), "xz")
 
         index_cmds = []
         deb_dirs_found = False
@@ -315,6 +316,7 @@ class DpkgIndexer(Indexer):
             cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % (arch_dir, apt_ftparchive)
 
             cmd += "%s -fc Packages > Packages.gz;" % gzip
+            cmd += "%s -fc Packages > Packages.xz;" % xz
 
             with open(os.path.join(arch_dir, "Release"), "w+") as release:
                 release.write("Label: %s\n" % arch)
-- 
2.7.4




More information about the Openembedded-core mailing list