commit:     2c7d38b9512609f6828cbba1066f2b3b2d9144bf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 30 20:36:14 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 20:49:40 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2c7d38b9

Rename BINPKG_COMPRESSION{,_ARGS} to BINPKG_COMPRESS{,_FLAGS}

This is more consistent with the names of the existing
PORTAGE_COMPRESS* variables.

Suggested-by: Michał Górny <mgorny <AT> gentoo.org>

 bin/quickpkg                                           |  2 +-
 man/make.conf.5                                        | 10 +++++-----
 pym/portage/package/ebuild/_config/special_env_vars.py |  1 +
 pym/portage/package/ebuild/config.py                   |  8 ++++----
 pym/portage/package/ebuild/doebuild.py                 |  2 +-
 pym/portage/util/compression_probe.py                  | 14 +++++++-------
 6 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/bin/quickpkg b/bin/quickpkg
index 750400592..392e9da22 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -137,7 +137,7 @@ def quickpkg_atom(options, infos, arg, eout):
                        binpkg_tmpfile = os.path.join(bintree.pkgdir,
                                cpv + ".tbz2." + str(os.getpid()))
                        ensure_dirs(os.path.dirname(binpkg_tmpfile))
-                       binpkg_compression = settings.get("BINPKG_COMPRESSION", 
"bzip2")
+                       binpkg_compression = settings.get("BINPKG_COMPRESS", 
"bzip2")
                        try:
                                compression = _compressors[binpkg_compression]
                        except KeyError as e:

diff --git a/man/make.conf.5 b/man/make.conf.5
index 8e0d04967..65c18cc6d 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -110,7 +110,7 @@ ACCEPT_RESTRICT="*"
 ACCEPT_RESTRICT="* -bindist"
 .fi
 .TP
-\fBBINPKG_COMPRESSION\fR = \fI"compression"\fR
+\fBBINPKG_COMPRESS\fR = \fI"compression"\fR
 This variable is used to determine the compression used for \fIbinary
 packages\fR. Supported settings and compression algorithms are: bzip2, gzip,
 lz4, lzip, lzop, xz, zstd.
@@ -120,19 +120,19 @@ Defaults to "bzip2".
 .I Example:
 .nf
 # Set it to use lz4:
-BINPKG_COMPRESSION="lz4"
+BINPKG_COMPRESS="lz4"
 .fi
 .TP
-\fBBINPKG_COMPRESSION_ARGS\fR = \fI"arguments for compression command"\fR
+\fBBINPKG_COMPRESS_FLAGS\fR = \fI"arguments for compression command"\fR
 This variable is used to add additional arguments to the compression command
-selected by \fBBINPKG_COMPRESSION\fR.
+selected by \fBBINPKG_COMPRESS\fR.
 .br
 Defaults to "".
 .br
 .I Example:
 .nf
 # Set it to use compression level 9:
-BINPKG_COMPRESSION_ARGS="-9"
+BINPKG_COMPRESS_FLAGS="-9"
 .fi
 .TP
 .B CBUILD

diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py 
b/pym/portage/package/ebuild/_config/special_env_vars.py
index f9b29af93..13da64008 100644
--- a/pym/portage/package/ebuild/_config/special_env_vars.py
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py
@@ -147,6 +147,7 @@ environ_filter += [
 environ_filter += [
        "ACCEPT_CHOSTS", "ACCEPT_KEYWORDS", "ACCEPT_PROPERTIES",
        "ACCEPT_RESTRICT", "AUTOCLEAN",
+       "BINPKG_COMPRESS", "BINPKG_COMPRESS_FLAGS",
        "CLEAN_DELAY", "COLLISION_IGNORE",
        "CONFIG_PROTECT", "CONFIG_PROTECT_MASK",
        "DCO_SIGNED_OFF_BY",

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 3d232e0be..6691024f2 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1172,12 +1172,12 @@ class config(object):
                                writemsg(_("!!! See 
https://bugs.pypy.org/issue833 for details.\n"),
                                        noiselevel=-1)
 
-               binpkg_compression = self.get("BINPKG_COMPRESSION")
+               binpkg_compression = self.get("BINPKG_COMPRESS")
                if binpkg_compression:
                        try:
                                compression = _compressors[binpkg_compression]
                        except KeyError as e:
-                               writemsg("!!! BINPKG_COMPRESSION contains 
invalid or "
+                               writemsg("!!! BINPKG_COMPRESS contains invalid 
or "
                                        "unsupported compression method: %s" % 
e.args[0],
                                        noiselevel=-1)
                        else:
@@ -1186,14 +1186,14 @@ class config(object):
                                                
portage.util.varexpand(compression["compress"],
                                                mydict=self))[0]
                                except IndexError as e:
-                                       writemsg("!!! BINPKG_COMPRESSION 
contains invalid or "
+                                       writemsg("!!! BINPKG_COMPRESS contains 
invalid or "
                                                "unsupported compression 
method: %s" % e.args[0],
                                                noiselevel=-1)
                                else:
                                        if portage.process.find_binary(
                                                compression_binary) is None:
                                                missing_package = 
compression["package"]
-                                               writemsg("!!! 
BINPKG_COMPRESSION unsupported %s. "
+                                               writemsg("!!! BINPKG_COMPRESS 
unsupported %s. "
                                                        "Missing package: %s" %
                                                        (binpkg_compression, 
missing_package),
                                                        noiselevel=-1)

diff --git a/pym/portage/package/ebuild/doebuild.py 
b/pym/portage/package/ebuild/doebuild.py
index 3e75d1a51..14d96f57c 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -526,7 +526,7 @@ def doebuild_environment(myebuild, mydo, myroot=None, 
settings=None,
                                mysettings["KV"] = ""
                        mysettings.backup_changes("KV")
 
-               binpkg_compression = mysettings.get("BINPKG_COMPRESSION", 
"bzip2")
+               binpkg_compression = mysettings.get("BINPKG_COMPRESS", "bzip2")
                try:
                        compression = _compressors[binpkg_compression]
                except KeyError as e:

diff --git a/pym/portage/util/compression_probe.py 
b/pym/portage/util/compression_probe.py
index b15200044..29d0eedff 100644
--- a/pym/portage/util/compression_probe.py
+++ b/pym/portage/util/compression_probe.py
@@ -13,38 +13,38 @@ from portage.exception import FileNotFound, PermissionDenied
 
 _compressors = {
        "bzip2": {
-               "compress": "${PORTAGE_BZIP2_COMMAND} 
${BINPKG_COMPRESSION_ARGS}",
+               "compress": "${PORTAGE_BZIP2_COMMAND} ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "${PORTAGE_BUNZIP2_COMMAND}",
                "decompress_alt": "${PORTAGE_BZIP2_COMMAND} -d",
                "package": "app-arch/bzip2",
        },
        "gzip": {
-               "compress": "gzip ${BINPKG_COMPRESSION_ARGS}",
+               "compress": "gzip ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "gzip -d",
                "package": "app-arch/gzip",
        },
        "lz4": {
-               "compress": "lz4 ${BINPKG_COMPRESSION_ARGS}",
+               "compress": "lz4 ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "lz4 -d",
                "package": "app-arch/lz4",
        },
        "lzip": {
-               "compress": "lzip ${BINPKG_COMPRESSION_ARGS}",
+               "compress": "lzip ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "lzip -d",
                "package": "app-arch/lzip",
        },
        "lzop": {
-               "compress": "lzop ${BINPKG_COMPRESSION_ARGS}",
+               "compress": "lzop ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "lzop -d",
                "package": "app-arch/lzop",
        },
        "xz": {
-               "compress": "xz ${BINPKG_COMPRESSION_ARGS}",
+               "compress": "xz ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "xz -d",
                "package": "app-arch/xz-utils",
        },
        "zstd": {
-               "compress": "zstd ${BINPKG_COMPRESSION_ARGS}",
+               "compress": "zstd ${BINPKG_COMPRESS_FLAGS}",
                "decompress": "zstd -d",
                "package": "app-arch/zstd",
        },

Reply via email to