Gentoo Archives: gentoo-portage-dev

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

Replies