On wto, 2017-07-04 at 23:33 +0200, Manuel Rüger wrote:
> On 04.07.2017 21:29, Zac Medico wrote:
> > On Fri, Jun 30, 2017 at 2:49 AM, Manuel Rüger <mr...@gentoo.org> wrote:
> > > +
> > > COMPRESSION_COMMAND=$(PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}}
> > > \
> > > +               "${PORTAGE_PYTHON:-/usr/bin/python}"
> > > "$PORTAGE_BIN_PATH"/binpkg-helper.py \
> > > +               compressioncmd ${CATEGORY}/${P})
> > > +       [ -z "${COMPRESSION_COMMAND}" ] && \
> > > +               die "Failed to get COMPRESSION_COMMAND"
> > >         tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${PROOT}" . | 
> > > \
> > > -               $PORTAGE_BZIP2_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
> > > +               $COMPRESSION_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
> > >         assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'"
> > >         PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
> > >                 "${PORTAGE_PYTHON:-/usr/bin/python}"
> > 
> > If all that we really need is COMPRESSION_COMMAND, then the helper
> > script is overkill. We should just pass a variable from
> > doebuild_environment function. The variable name must be prefixed with
> > PORTAGE_.
> > 
> > Also, note that your mail client wrapped lines in this patch.
> > 
> 
> Thanks for the review Zac!
> 
> We'd need a bit more as the COMPRESSION_COMMAND depends on
> ${CATEGORY}/${P} here in order to avoid a catch22 when using a
> decompressor that is set to something a standard install doesn't include.
> 
> Assume all binpkgs are set to be compressed with zstd, the patch makes
> sure an app-arch/zstd binpkg will still be compressed with bzip2.

And app-arch/bzip2 binpackage?

In other words, that's the wrong approach. If I set binpackages to use
X, I want them to use X, not 'use X if someone thought it correct to use
X'. Just do what the user says to do. If you try to outsmart him, you're
building another Windows.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to