Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 871573 - sys-apps/portage: BINPKG_COMPRESS_FLAGS needs per-compressor override
Summary: sys-apps/portage: BINPKG_COMPRESS_FLAGS needs per-compressor override
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 873757
Blocks:
  Show dependency tree
 
Reported: 2022-09-18 19:35 UTC by Michał Górny
Modified: 2022-11-20 03:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-18 19:35:26 UTC
I have the following set in make.conf:

  BINPKG_COMPRESS="zstd"
  BINPKG_COMPRESS_FLAGS="-T0 -9"

I've just discovered that Portage applies BINPKG_COMPRESS_FLAGS to all possible compressors when performing updates on existing binpackages.  This causes errors when I want to include flags specific to zstd.  I suppose we need an option to specify BINPKG_COMPRESS_FLAGS_ZSTD, etc. that apply to a single compressor only.
Comment 1 Sheng Yu 2022-09-18 21:23:07 UTC
Use BINPKG_COMPRESS_FLAGS_ZSTD only and ignore BINPKG_COMPRESS_FLAGS, or use BINPKG_COMPRESS_FLAGS + BINPKG_COMPRESS_FLAGS_ZSTD?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-19 06:00:45 UTC
(In reply to Sheng Yu from comment #1)
> Use BINPKG_COMPRESS_FLAGS_ZSTD only and ignore BINPKG_COMPRESS_FLAGS, or use
> BINPKG_COMPRESS_FLAGS + BINPKG_COMPRESS_FLAGS_ZSTD?

Use BINPKG_COMPRESS_FLAGS_ZSTD only, if it is set, and fallback to BINPKG_COMPRESS_FLAGS if it's not set.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-19 06:25:09 UTC
i.e. in bash-speak:

${COMPRESS_OPTIONS_ZSTD:-${COMPRESS_OPTIONS}}
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-19 06:25:33 UTC
Sorry, I meant:

${BINPKG_COMPRESS_FLAGS_ZSTD-${BINPKG_COMPRESS_FLAGS}}
Comment 5 Larry the Git Cow gentoo-dev 2022-10-18 00:37:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e261ba845df7342eb72ee0ffb1ad84dabdd154a9

commit e261ba845df7342eb72ee0ffb1ad84dabdd154a9
Author:     Sheng Yu <syu.os@protonmail.com>
AuthorDate: 2022-10-15 04:09:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-18 00:36:30 +0000

    Add per format compression flags for binpkg
    
    This added new config BINPKG_COMPRESS_FLAGS_[format] to be used
    for different compression method. General BINPKG_COMPRESS_FLAGS
    will be ignored if current method had specified BINPKG_COMPRESS_FLAGS_[format]
    
    e.g. BINPKG_COMPRESS_FLAGS_ZSTD="-9"
    
    Bug: https://bugs.gentoo.org/871573
    Signed-off-by: Sheng Yu <syu.os@protonmail.com>
    Closes: https://github.com/gentoo/portage/pull/909
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/quickpkg                           | 12 ++++++++++++
 lib/portage/gpkg.py                    | 12 ++++++++++--
 lib/portage/package/ebuild/config.py   | 11 +++++++++++
 lib/portage/package/ebuild/doebuild.py | 19 +++++++++++++++----
 man/make.conf.5                        | 12 ++++++++++++
 5 files changed, 60 insertions(+), 6 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2022-11-20 03:05:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=203e0d0083b5e7d8098785ec8862c02f6baf5534

commit 203e0d0083b5e7d8098785ec8862c02f6baf5534
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-20 03:04:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-20 03:05:40 +0000

    sys-apps/portage: add 3.0.39
    
    Closes: https://bugs.gentoo.org/365655
    Closes: https://bugs.gentoo.org/757525
    Closes: https://bugs.gentoo.org/871573
    Closes: https://bugs.gentoo.org/875812
    Closes: https://bugs.gentoo.org/875860
    Closes: https://bugs.gentoo.org/877215
    Closes: https://bugs.gentoo.org/877271
    Closes: https://bugs.gentoo.org/877357
    Closes: https://bugs.gentoo.org/877419
    Closes: https://bugs.gentoo.org/873757
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.39.ebuild | 273 +++++++++++++++++++++++++++++++++
 2 files changed, 274 insertions(+)