1 |
On Tue, Jul 4, 2017 at 2:33 PM, Manuel Rüger <mrueg@g.o> 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 |
Inside the doebuild_environment function, there's a mycpv, mypv, and |
37 |
cat variables available to use, and it's also possible to access |
38 |
relevant package.env variables via mysettings. |
39 |
|
40 |
> Mails were sent with Thunderbird, I'll set up git send-mail next time. |
41 |
|
42 |
Okay, thanks. |
43 |
-- |
44 |
Thanks, |
45 |
Zac |