Gentoo Archives: gentoo-catalyst

From: Daniel Cordero <gentoo.catalyst@××××.ws>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 2/2] Decompressor uses decompression options
Date: Sun, 31 May 2020 12:44:23
Message-Id: 20200531124402.GA1304557@dysnomia.localdomain
In Reply to: [gentoo-catalyst] [PATCH 2/2] Decompressor uses decompression options by Daniel Cordero
1 On Fri, May 29, 2020 at 07:04:32PM +0000, Daniel Cordero wrote:
2 >
3 > If decompressor != compressor, the options given to the programs may not
4 > be understood, causing runtime errors.
5 >
6 > Allow the compression arguments to be overridden in a specfile.
7 > Compressor can already be configured with compression_mode.
8 >
9 > For decompression, while the decompressor is detected by the file
10 > extension, use the separate decomp_opts so there is no argument
11 > conflicts.
12 > ---
13 > Note: compressor_options can't be empty, as catalyst just drops the key.
14 >
15 > catalyst/base/stagebase.py | 3 ++-
16 > catalyst/defaults.py | 2 +-
17 > 2 files changed, 3 insertions(+), 2 deletions(-)
18 >
19 > diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
20 > index 5a8cd1df..6efcf0d1 100644
21 > --- a/catalyst/base/stagebase.py
22 > +++ b/catalyst/base/stagebase.py
23 > @@ -48,6 +48,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
24 > "cflags",
25 > "common_flags",
26 > "compression_mode",
27 > + "compressor_options",
28 > "cxxflags",
29 > "decompressor_search_order",
30 > "distcc_hosts",
31 > @@ -677,7 +678,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
32 > source=self.settings["source_path"],
33 > destination=self.settings["chroot_path"],
34 > arch=self.settings["compressor_arch"],
35 > - other_options=self.settings["compressor_options"],
36 > + other_options=self.settings["decomp_opt"],
37 > )
38 >
39 > display_msg = (
40
41 Speaking with some people in #gentoo-releng, this patch will break pixz
42 and lbzip2 decompression during the unpack stage. Will rework.
43
44 > diff --git a/catalyst/defaults.py b/catalyst/defaults.py
45 > index c153fcc4..fbf406b2 100644
46 > --- a/catalyst/defaults.py
47 > +++ b/catalyst/defaults.py
48 > @@ -30,7 +30,7 @@ confdefaults = {
49 > "compression_mode": 'lbzip2',
50 > "compressor_arch": None,
51 > "compressor_options": XATTRS_OPTIONS['linux'],
52 > - "decomp_opt": DECOMPRESSOR_PROGRAM_OPTIONS['linux'],
53 > + "decomp_opt": XATTRS_OPTIONS['linux'],
54 > "decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER,
55 > "distdir": portage.settings['DISTDIR'],
56 > "icecream": "/var/cache/icecream",
57 > --
58 > 2.26.2
59 >
60 >