1 |
commit: 2c7d38b9512609f6828cbba1066f2b3b2d9144bf |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 30 20:36:14 2017 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 30 20:49:40 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2c7d38b9 |
7 |
|
8 |
Rename BINPKG_COMPRESSION{,_ARGS} to BINPKG_COMPRESS{,_FLAGS} |
9 |
|
10 |
This is more consistent with the names of the existing |
11 |
PORTAGE_COMPRESS* variables. |
12 |
|
13 |
Suggested-by: Michał Górny <mgorny <AT> gentoo.org> |
14 |
|
15 |
bin/quickpkg | 2 +- |
16 |
man/make.conf.5 | 10 +++++----- |
17 |
pym/portage/package/ebuild/_config/special_env_vars.py | 1 + |
18 |
pym/portage/package/ebuild/config.py | 8 ++++---- |
19 |
pym/portage/package/ebuild/doebuild.py | 2 +- |
20 |
pym/portage/util/compression_probe.py | 14 +++++++------- |
21 |
6 files changed, 19 insertions(+), 18 deletions(-) |
22 |
|
23 |
diff --git a/bin/quickpkg b/bin/quickpkg |
24 |
index 750400592..392e9da22 100755 |
25 |
--- a/bin/quickpkg |
26 |
+++ b/bin/quickpkg |
27 |
@@ -137,7 +137,7 @@ def quickpkg_atom(options, infos, arg, eout): |
28 |
binpkg_tmpfile = os.path.join(bintree.pkgdir, |
29 |
cpv + ".tbz2." + str(os.getpid())) |
30 |
ensure_dirs(os.path.dirname(binpkg_tmpfile)) |
31 |
- binpkg_compression = settings.get("BINPKG_COMPRESSION", "bzip2") |
32 |
+ binpkg_compression = settings.get("BINPKG_COMPRESS", "bzip2") |
33 |
try: |
34 |
compression = _compressors[binpkg_compression] |
35 |
except KeyError as e: |
36 |
|
37 |
diff --git a/man/make.conf.5 b/man/make.conf.5 |
38 |
index 8e0d04967..65c18cc6d 100644 |
39 |
--- a/man/make.conf.5 |
40 |
+++ b/man/make.conf.5 |
41 |
@@ -110,7 +110,7 @@ ACCEPT_RESTRICT="*" |
42 |
ACCEPT_RESTRICT="* -bindist" |
43 |
.fi |
44 |
.TP |
45 |
-\fBBINPKG_COMPRESSION\fR = \fI"compression"\fR |
46 |
+\fBBINPKG_COMPRESS\fR = \fI"compression"\fR |
47 |
This variable is used to determine the compression used for \fIbinary |
48 |
packages\fR. Supported settings and compression algorithms are: bzip2, gzip, |
49 |
lz4, lzip, lzop, xz, zstd. |
50 |
@@ -120,19 +120,19 @@ Defaults to "bzip2". |
51 |
.I Example: |
52 |
.nf |
53 |
# Set it to use lz4: |
54 |
-BINPKG_COMPRESSION="lz4" |
55 |
+BINPKG_COMPRESS="lz4" |
56 |
.fi |
57 |
.TP |
58 |
-\fBBINPKG_COMPRESSION_ARGS\fR = \fI"arguments for compression command"\fR |
59 |
+\fBBINPKG_COMPRESS_FLAGS\fR = \fI"arguments for compression command"\fR |
60 |
This variable is used to add additional arguments to the compression command |
61 |
-selected by \fBBINPKG_COMPRESSION\fR. |
62 |
+selected by \fBBINPKG_COMPRESS\fR. |
63 |
.br |
64 |
Defaults to "". |
65 |
.br |
66 |
.I Example: |
67 |
.nf |
68 |
# Set it to use compression level 9: |
69 |
-BINPKG_COMPRESSION_ARGS="-9" |
70 |
+BINPKG_COMPRESS_FLAGS="-9" |
71 |
.fi |
72 |
.TP |
73 |
.B CBUILD |
74 |
|
75 |
diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py b/pym/portage/package/ebuild/_config/special_env_vars.py |
76 |
index f9b29af93..13da64008 100644 |
77 |
--- a/pym/portage/package/ebuild/_config/special_env_vars.py |
78 |
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py |
79 |
@@ -147,6 +147,7 @@ environ_filter += [ |
80 |
environ_filter += [ |
81 |
"ACCEPT_CHOSTS", "ACCEPT_KEYWORDS", "ACCEPT_PROPERTIES", |
82 |
"ACCEPT_RESTRICT", "AUTOCLEAN", |
83 |
+ "BINPKG_COMPRESS", "BINPKG_COMPRESS_FLAGS", |
84 |
"CLEAN_DELAY", "COLLISION_IGNORE", |
85 |
"CONFIG_PROTECT", "CONFIG_PROTECT_MASK", |
86 |
"DCO_SIGNED_OFF_BY", |
87 |
|
88 |
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
89 |
index 3d232e0be..6691024f2 100644 |
90 |
--- a/pym/portage/package/ebuild/config.py |
91 |
+++ b/pym/portage/package/ebuild/config.py |
92 |
@@ -1172,12 +1172,12 @@ class config(object): |
93 |
writemsg(_("!!! See https://bugs.pypy.org/issue833 for details.\n"), |
94 |
noiselevel=-1) |
95 |
|
96 |
- binpkg_compression = self.get("BINPKG_COMPRESSION") |
97 |
+ binpkg_compression = self.get("BINPKG_COMPRESS") |
98 |
if binpkg_compression: |
99 |
try: |
100 |
compression = _compressors[binpkg_compression] |
101 |
except KeyError as e: |
102 |
- writemsg("!!! BINPKG_COMPRESSION contains invalid or " |
103 |
+ writemsg("!!! BINPKG_COMPRESS contains invalid or " |
104 |
"unsupported compression method: %s" % e.args[0], |
105 |
noiselevel=-1) |
106 |
else: |
107 |
@@ -1186,14 +1186,14 @@ class config(object): |
108 |
portage.util.varexpand(compression["compress"], |
109 |
mydict=self))[0] |
110 |
except IndexError as e: |
111 |
- writemsg("!!! BINPKG_COMPRESSION contains invalid or " |
112 |
+ writemsg("!!! BINPKG_COMPRESS contains invalid or " |
113 |
"unsupported compression method: %s" % e.args[0], |
114 |
noiselevel=-1) |
115 |
else: |
116 |
if portage.process.find_binary( |
117 |
compression_binary) is None: |
118 |
missing_package = compression["package"] |
119 |
- writemsg("!!! BINPKG_COMPRESSION unsupported %s. " |
120 |
+ writemsg("!!! BINPKG_COMPRESS unsupported %s. " |
121 |
"Missing package: %s" % |
122 |
(binpkg_compression, missing_package), |
123 |
noiselevel=-1) |
124 |
|
125 |
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py |
126 |
index 3e75d1a51..14d96f57c 100644 |
127 |
--- a/pym/portage/package/ebuild/doebuild.py |
128 |
+++ b/pym/portage/package/ebuild/doebuild.py |
129 |
@@ -526,7 +526,7 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None, |
130 |
mysettings["KV"] = "" |
131 |
mysettings.backup_changes("KV") |
132 |
|
133 |
- binpkg_compression = mysettings.get("BINPKG_COMPRESSION", "bzip2") |
134 |
+ binpkg_compression = mysettings.get("BINPKG_COMPRESS", "bzip2") |
135 |
try: |
136 |
compression = _compressors[binpkg_compression] |
137 |
except KeyError as e: |
138 |
|
139 |
diff --git a/pym/portage/util/compression_probe.py b/pym/portage/util/compression_probe.py |
140 |
index b15200044..29d0eedff 100644 |
141 |
--- a/pym/portage/util/compression_probe.py |
142 |
+++ b/pym/portage/util/compression_probe.py |
143 |
@@ -13,38 +13,38 @@ from portage.exception import FileNotFound, PermissionDenied |
144 |
|
145 |
_compressors = { |
146 |
"bzip2": { |
147 |
- "compress": "${PORTAGE_BZIP2_COMMAND} ${BINPKG_COMPRESSION_ARGS}", |
148 |
+ "compress": "${PORTAGE_BZIP2_COMMAND} ${BINPKG_COMPRESS_FLAGS}", |
149 |
"decompress": "${PORTAGE_BUNZIP2_COMMAND}", |
150 |
"decompress_alt": "${PORTAGE_BZIP2_COMMAND} -d", |
151 |
"package": "app-arch/bzip2", |
152 |
}, |
153 |
"gzip": { |
154 |
- "compress": "gzip ${BINPKG_COMPRESSION_ARGS}", |
155 |
+ "compress": "gzip ${BINPKG_COMPRESS_FLAGS}", |
156 |
"decompress": "gzip -d", |
157 |
"package": "app-arch/gzip", |
158 |
}, |
159 |
"lz4": { |
160 |
- "compress": "lz4 ${BINPKG_COMPRESSION_ARGS}", |
161 |
+ "compress": "lz4 ${BINPKG_COMPRESS_FLAGS}", |
162 |
"decompress": "lz4 -d", |
163 |
"package": "app-arch/lz4", |
164 |
}, |
165 |
"lzip": { |
166 |
- "compress": "lzip ${BINPKG_COMPRESSION_ARGS}", |
167 |
+ "compress": "lzip ${BINPKG_COMPRESS_FLAGS}", |
168 |
"decompress": "lzip -d", |
169 |
"package": "app-arch/lzip", |
170 |
}, |
171 |
"lzop": { |
172 |
- "compress": "lzop ${BINPKG_COMPRESSION_ARGS}", |
173 |
+ "compress": "lzop ${BINPKG_COMPRESS_FLAGS}", |
174 |
"decompress": "lzop -d", |
175 |
"package": "app-arch/lzop", |
176 |
}, |
177 |
"xz": { |
178 |
- "compress": "xz ${BINPKG_COMPRESSION_ARGS}", |
179 |
+ "compress": "xz ${BINPKG_COMPRESS_FLAGS}", |
180 |
"decompress": "xz -d", |
181 |
"package": "app-arch/xz-utils", |
182 |
}, |
183 |
"zstd": { |
184 |
- "compress": "zstd ${BINPKG_COMPRESSION_ARGS}", |
185 |
+ "compress": "zstd ${BINPKG_COMPRESS_FLAGS}", |
186 |
"decompress": "zstd -d", |
187 |
"package": "app-arch/zstd", |
188 |
}, |