Add HAIKU_PACKAGE_COMPRESSION_LEVEL build variable
It allows to control the compression level used for package creation and update. The default (9) is *very* slow, so developers may want to use a smaller level during the regular development process to keep turn-around times low.
This commit is contained in:
parent
796343ed73
commit
06f5437c21
@ -310,6 +310,8 @@ rule BuildHaikuPackage package : packageInfo
|
||||
AddVariableToScript $(script) : tmpDir : $(tempDir) ;
|
||||
AddVariableToScript $(script) : addBuildCompatibilityLibDir
|
||||
: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
|
||||
AddVariableToScript $(script) : compressionLevel
|
||||
: $(HAIKU_PACKAGE_COMPRESSION_LEVEL) ;
|
||||
AddVariableToScript $(script) : updateOnly
|
||||
: [ on $(package) return $(HAIKU_CONTAINER_UPDATE_ONLY) ] ;
|
||||
AddTargetVariableToScript $(script) : <build>addattr ;
|
||||
@ -434,3 +436,7 @@ rule AddLibrariesToPackage directory : libs
|
||||
AddLibrariesToContainer $(HAIKU_CURRENTLY_BUILT_HAIKU_PACKAGE)
|
||||
: $(directory) : $(libs) ;
|
||||
}
|
||||
|
||||
|
||||
# default value for the package compression level
|
||||
HAIKU_PACKAGE_COMPRESSION_LEVEL ?= 9 ;
|
||||
|
@ -79,6 +79,18 @@ HAIKU_INSTALL_DIR = /Haiku ;
|
||||
# freshly be initialized with BFS. Useful when installing Haiku on a partition.
|
||||
HAIKU_DONT_CLEAR_IMAGE = 1 ;
|
||||
|
||||
# Set the compression level for the creation and update of Haiku packages to 1.
|
||||
# Values from 0 to 9 are supported. 0 means no compression, 1 fastest, ..., and
|
||||
# 9 best. The default is 9 which should be used for official builds (release or
|
||||
# nightly) to achieve the smallest possible package files at the cost of long
|
||||
# package building times. For developers who frequently rebuild/update packages
|
||||
# level 1 is a good compromise. Depending on the package data it's about an
|
||||
# order of magnitude faster while still achieving acceptable compression ratios.
|
||||
# Using level 0 will make package creation mostly I/O bound. It can be used, if
|
||||
# package size is not a concern. Depending on the package data, files may be
|
||||
# several times larger than even with level 1.
|
||||
HAIKU_PACKAGE_COMPRESSION_LEVEL = 1 ;
|
||||
|
||||
|
||||
# Affects the haiku-image, haiku-vmware-image, and install-haiku targets. Only
|
||||
# targets on which the HAIKU_INCLUDE_IN_IMAGE variable has been set will be
|
||||
|
@ -7,6 +7,7 @@ set -o errexit
|
||||
# outputDir
|
||||
# sourceDir
|
||||
# tmpDir
|
||||
# compressionLevel
|
||||
# updateOnly
|
||||
#
|
||||
# addattr
|
||||
@ -69,7 +70,9 @@ $mimeset --mimedb "$mimeDB" "$contentsDir"
|
||||
# create the package
|
||||
if [ ! $updateOnly ]; then
|
||||
rm -f "$packagePath"
|
||||
$package create -q -i "$packageInfoPath" -C "$contentsDir" "$packagePath"
|
||||
$package create -q "-$compressionLevel" -i "$packageInfoPath" \
|
||||
-C "$contentsDir" "$packagePath"
|
||||
else
|
||||
$package add -q -f -i "$packageInfoPath" -C "$contentsDir" "$packagePath" .
|
||||
$package add -q -f "-$compressionLevel" -i "$packageInfoPath" \
|
||||
-C "$contentsDir" "$packagePath" .
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user