Gentoo Archives: gentoo-portage-dev

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] Support different (de)compressors for binary packages
Date: Tue, 04 Jul 2017 21:33:29
Message-Id: c9cf9f5d-f21b-da30-078e-fcb021efb465@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] Support different (de)compressors for binary packages by Zac Medico
1 On 04.07.2017 21:29, Zac Medico wrote:
2 > On Fri, Jun 30, 2017 at 2:49 AM, Manuel Rüger <mrueg@g.o> wrote:
3 >> +
4 >> COMPRESSION_COMMAND=$(PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}}
5 >> \
6 >> + "${PORTAGE_PYTHON:-/usr/bin/python}"
7 >> "$PORTAGE_BIN_PATH"/binpkg-helper.py \
8 >> + compressioncmd ${CATEGORY}/${P})
9 >> + [ -z "${COMPRESSION_COMMAND}" ] && \
10 >> + die "Failed to get COMPRESSION_COMMAND"
11 >> tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${PROOT}" . | \
12 >> - $PORTAGE_BZIP2_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
13 >> + $COMPRESSION_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
14 >> assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'"
15 >> PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
16 >> "${PORTAGE_PYTHON:-/usr/bin/python}"
17 >
18 > If all that we really need is COMPRESSION_COMMAND, then the helper
19 > script is overkill. We should just pass a variable from
20 > doebuild_environment function. The variable name must be prefixed with
21 > PORTAGE_.
22 >
23 > Also, note that your mail client wrapped lines in this patch.
24 >
25
26 Thanks for the review Zac!
27
28 We'd need a bit more as the COMPRESSION_COMMAND depends on
29 ${CATEGORY}/${P} here in order to avoid a catch22 when using a
30 decompressor that is set to something a standard install doesn't include.
31
32 Assume all binpkgs are set to be compressed with zstd, the patch makes
33 sure an app-arch/zstd binpkg will still be compressed with bzip2.
34
35 Mails were sent with Thunderbird, I'll set up git send-mail next time.

Attachments

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

Replies