From 810b318612199943bd7a0f094b24224eb8210e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6k=C3=A7en=20Eraslan?= Date: Wed, 23 Dec 2009 12:30:20 +0000 Subject: [PATCH] Apply commit r23485 (sort the files according to their path names before adding them to the tarfile.) for delta packages. --- pisi/operations/delta.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pisi/operations/delta.py b/pisi/operations/delta.py index be0defe7..c8cba09e 100644 --- a/pisi/operations/delta.py +++ b/pisi/operations/delta.py @@ -71,6 +71,11 @@ def create_delta_package(old_package, new_package): # only metadata information may change in a package, so no install.tar.lzma added to delta package if files_delta: + # Sort the files in-place according to their path for an ordered + # tarfile layout which dramatically improves the compression performance + # of lzma. This improvement is stolen from build.py (commit r23485). + files_delta.sort(key=lambda x: x.path) + ctx.build_leftover = util.join_path(ctx.config.tmp_dir(), ctx.const.install_tar_lzma) tar = archive.ArchiveTar(util.join_path(ctx.config.tmp_dir(), ctx.const.install_tar_lzma), "tarlzma")