Sort the files according to their path names

before adding them to the tarfile. This helps lzma to compress the
install.tar better. Thanks Onur for noticing this and giving the idea.

install.tar.lzma for the kernel-source package dropped from 54MB to 47MB
after applying this patch.
This commit is contained in:
Ozan Çağlayan
2009-06-06 13:21:54 +00:00
parent 22a4e4de05
commit 786138b4bd
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -1,3 +1,8 @@
2009-06-06 Ozan Çağlayan <ozan@pardus.org.tr>
* (operations/build.py): Sort the files according to their path names
before adding them to the tarfile. This helps lzma to compress the
install.tar better. Thanks Onur for noticing this and giving the idea.
2009-05-07 Bahadır Kandemir <bahadir@pardus.org.tr>
* Set DBus timeout for setupPackage calls.
+5
View File
@@ -965,6 +965,11 @@ class Builder:
files = pisi.files.Files()
files.read(ctx.const.files_xml)
# Sort the files in-place according to their path for an ordered
# tarfile layout which dramatically improves the compression performance
# of lzma.
files.list.sort(key=lambda x: x.path)
if ctx.get_option('package_format') == "1.0":
for finfo in files.list:
orgname = arcname = pisi.util.join_path("install", finfo.path)