From: Daniel Cordero <[email protected]>
If decompressor != compressor, the options given to the programs may not
be understood, causing runtime errors.
Allow the compression arguments to be overridden in a specfile.
Compressor can already be configured with compression_mode.
For decompression, while the decompressor is detected by the file
extension, use the separate decomp_opts so there is no argument
conflicts.
---
Note: compressor_options can't be empty, as catalyst just drops the key.
catalyst/base/stagebase.py | 3 ++-
catalyst/defaults.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5a8cd1df..6efcf0d1 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -48,6 +48,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
"cflags",
"common_flags",
"compression_mode",
+ "compressor_options",
"cxxflags",
"decompressor_search_order",
"distcc_hosts",
@@ -677,7 +678,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
source=self.settings["source_path"],
destination=self.settings["chroot_path"],
arch=self.settings["compressor_arch"],
- other_options=self.settings["compressor_options"],
+ other_options=self.settings["decomp_opt"],
)
display_msg = (
diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index c153fcc4..fbf406b2 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -30,7 +30,7 @@ confdefaults = {
"compression_mode": 'lbzip2',
"compressor_arch": None,
"compressor_options": XATTRS_OPTIONS['linux'],
- "decomp_opt": DECOMPRESSOR_PROGRAM_OPTIONS['linux'],
+ "decomp_opt": XATTRS_OPTIONS['linux'],
"decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER,
"distdir": portage.settings['DISTDIR'],
"icecream": "/var/cache/icecream",
--
2.26.2