mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[improvement][aur] optimizations to speed up zst packages building
This commit is contained in:
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- improved how missing dependencies are checked when installing a new package ( the old way was not identifying some missing dependencies of **anbox-git** ). It is possible to use the old algorithm by setting **simple_checking** to **true** in **~/.config/bauh/arch.yml**. More information at [README](https://github.com/vinifmor/bauh/#aur--arch-).
|
- improved how missing dependencies are checked when installing a new package ( the old way was not identifying some missing dependencies of **anbox-git** ). It is possible to use the old algorithm by setting **simple_checking** to **true** in **~/.config/bauh/arch.yml**. More information at [README](https://github.com/vinifmor/bauh/#aur--arch-).
|
||||||
- checking architecture dependencies (x86_64, i686)
|
- checking architecture dependencies (x86_64, i686)
|
||||||
- architecture dependencies are displayed on the info window as well
|
- architecture dependencies are displayed on the info window as well
|
||||||
|
- optimizations to speed up zst packages building
|
||||||
- Web:
|
- Web:
|
||||||
- separate temp build folder for standard and root users
|
- separate temp build folder for standard and root users
|
||||||
- UI:
|
- UI:
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ db_updater:
|
|||||||
then a copy of **/etc/makepkg.conf** will be generated at **~/.config/bauh/arch/makepkg.conf** defining MAKEFLAGS to work with
|
then a copy of **/etc/makepkg.conf** will be generated at **~/.config/bauh/arch/makepkg.conf** defining MAKEFLAGS to work with
|
||||||
the number of your machine processors (**-j${nproc}**).
|
the number of your machine processors (**-j${nproc}**).
|
||||||
|
|
||||||
b) same as previous, but related to **COMPRESSXZ** definition ( if '--threads=0' is not defined )
|
b) same as previous, but related to **COMPRESSXZ** and **COMPRESSZST** definitions ( if '--threads=0' is not defined )
|
||||||
|
|
||||||
c) **ccache** will be added to **BUILDENV** if it is installed on the system and already not defined
|
c) **ccache** will be added to **BUILDENV** if it is installed on the system and already not defined
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ class ArchCompilationOptimizer(Thread):
|
|||||||
super(ArchCompilationOptimizer, self).__init__(daemon=True)
|
super(ArchCompilationOptimizer, self).__init__(daemon=True)
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
self.re_compress_xz = re.compile(r'#?\s*COMPRESSXZ\s*=\s*.+')
|
self.re_compress_xz = re.compile(r'#?\s*COMPRESSXZ\s*=\s*.+')
|
||||||
|
self.re_compress_zst = re.compile(r'#?\s*COMPRESSZST\s*=\s*.+')
|
||||||
self.re_build_env = re.compile(r'\s+BUILDENV\s*=.+')
|
self.re_build_env = re.compile(r'\s+BUILDENV\s*=.+')
|
||||||
self.re_ccache = re.compile(r'!?ccache')
|
self.re_ccache = re.compile(r'!?ccache')
|
||||||
|
|
||||||
@@ -127,6 +128,19 @@ class ArchCompilationOptimizer(Thread):
|
|||||||
else:
|
else:
|
||||||
optimizations.append('COMPRESSXZ=(xz -c -z - --threads=0)')
|
optimizations.append('COMPRESSXZ=(xz -c -z - --threads=0)')
|
||||||
|
|
||||||
|
compress_zst = self.re_compress_zst.findall(custom_makepkg or global_makepkg)
|
||||||
|
|
||||||
|
if compress_zst:
|
||||||
|
not_eligible = [f for f in compress_zst if not f.startswith('#') and '--threads' in f]
|
||||||
|
|
||||||
|
if not not_eligible:
|
||||||
|
custom_makepkg = self.re_compress_zst.sub('', custom_makepkg or global_makepkg)
|
||||||
|
optimizations.append('COMPRESSZST=(zstd -c -z -q - --threads=0)')
|
||||||
|
else:
|
||||||
|
self.logger.warning("It seems '{}' COMPRESSZST is already customized".format(GLOBAL_MAKEPKG))
|
||||||
|
else:
|
||||||
|
optimizations.append('COMPRESSZST=(zstd -c -z -q - --threads=0)')
|
||||||
|
|
||||||
build_envs = self.re_build_env.findall(custom_makepkg or global_makepkg)
|
build_envs = self.re_build_env.findall(custom_makepkg or global_makepkg)
|
||||||
|
|
||||||
if build_envs:
|
if build_envs:
|
||||||
|
|||||||
Reference in New Issue
Block a user