Gentoo Archives: gentoo-portage-dev

From: "Manuel Rüger" <mrueg@g.o>
To: Zac Medico <zmedico@g.o>, gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH v2] Support different compressors for binary packages
Date: Sat, 29 Jul 2017 22:56:19
Message-Id: 66383736-9866-f30e-3b04-8a1bbc282aee@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH v2] Support different compressors for binary packages by Zac Medico
1 Pushed as:
2 https://gitweb.gentoo.org/proj/portage.git/commit/?id=cff2c0149142843316e1851c2e73bcec30f08471
3
4 Thanks for the patient reviews, Zac!
5
6 Cheers,
7 Manuel
8
9 On 28.07.2017 18:24, Zac Medico wrote:
10 > The patch is looking really good now. Thanks for working on this!
11 >
12 > On Fri, Jul 28, 2017 at 2:59 AM, Manuel Rüger <mrueg@g.o> wrote:
13 >> @@ -518,6 +526,26 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None,
14 >> mysettings["KV"] = ""
15 >> mysettings.backup_changes("KV")
16 >>
17 >> + binpkg_compression = mysettings.get("BINPKG_COMPRESSION", "bzip2")
18 >> + try:
19 >> + compression = _compressors[binpkg_compression]
20 >> + except KeyError as e:
21 >> + writemsg("Warning: Invalid or unsupported compression method: %s" % e.args[0])
22 >> + else:
23 >> + try:
24 >> + compression_binary = shlex_split(varexpand(compression["compress"], mydict=settings))[0]
25 >> + except IndexError as e:
26 >> + writemsg("Warning: Invalid or unsupported compression method: %s" % e.args[0])
27 >> + else:
28 >> + if find_binary(compression_binary) is None:
29 >> + missing_package = compression["package"]
30 >> + writemsg("Warning: File compression unsupported %s. Missing package: %s" % (binpkg_compression, missing_package))
31 >
32 > It's going to be very helpful if we add some code to detect this case
33 > in emerge's action_build function, and exit unsuccessfully if the
34 > global BINPKG_COMPRESSION setting is invalid or the required package
35 > is missing. This will ensure that people don't build a bunch of binary
36 > packages, only to find out later that their BINPKG_COMPRESSION setting
37 > was ineffective.
38 >

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies