Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] Support different (de)compressors for binary packages
Date: Wed, 05 Jul 2017 08:03:49
Message-Id: 1499241821.1748.3.camel@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Support different (de)compressors for binary packages by "Manuel Rüger"
1 On wto, 2017-07-04 at 23:33 +0200, Manuel Rüger wrote:
2 > On 04.07.2017 21:29, Zac Medico wrote:
3 > > On Fri, Jun 30, 2017 at 2:49 AM, Manuel Rüger <mrueg@g.o> wrote:
4 > > > +
5 > > > COMPRESSION_COMMAND=$(PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}}
6 > > > \
7 > > > + "${PORTAGE_PYTHON:-/usr/bin/python}"
8 > > > "$PORTAGE_BIN_PATH"/binpkg-helper.py \
9 > > > + compressioncmd ${CATEGORY}/${P})
10 > > > + [ -z "${COMPRESSION_COMMAND}" ] && \
11 > > > + die "Failed to get COMPRESSION_COMMAND"
12 > > > tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${PROOT}" . | \
13 > > > - $PORTAGE_BZIP2_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
14 > > > + $COMPRESSION_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
15 > > > assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'"
16 > > > PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
17 > > > "${PORTAGE_PYTHON:-/usr/bin/python}"
18 > >
19 > > If all that we really need is COMPRESSION_COMMAND, then the helper
20 > > script is overkill. We should just pass a variable from
21 > > doebuild_environment function. The variable name must be prefixed with
22 > > PORTAGE_.
23 > >
24 > > Also, note that your mail client wrapped lines in this patch.
25 > >
26 >
27 > Thanks for the review Zac!
28 >
29 > We'd need a bit more as the COMPRESSION_COMMAND depends on
30 > ${CATEGORY}/${P} here in order to avoid a catch22 when using a
31 > decompressor that is set to something a standard install doesn't include.
32 >
33 > Assume all binpkgs are set to be compressed with zstd, the patch makes
34 > sure an app-arch/zstd binpkg will still be compressed with bzip2.
35
36 And app-arch/bzip2 binpackage?
37
38 In other words, that's the wrong approach. If I set binpackages to use
39 X, I want them to use X, not 'use X if someone thought it correct to use
40 X'. Just do what the user says to do. If you try to outsmart him, you're
41 building another Windows.
42
43 --
44 Best regards,
45 Michał Górny

Attachments

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

Replies