Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 719456

Summary: sys-apps/portage should have USE flag to pull in zstd as an RDEPEND
Product: Portage Development Reporter: Ian Leonard <antonlacon>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Severity: normal CC: alexander, fturco, kfm
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on: 715108    
Bug Blocks: 721152    

Description Ian Leonard 2020-04-25 22:58:09 UTC
Portage advertises zstd support for compressing binary packages. See the manpage for make.conf regarding BINPKG_COMPRESS. Using BINPKG_COMPRESS="zstd" without app-arch/zstd installed results in:

!!! BINPKG_COMPRESS unsupported zstd. Missing package: app-arch/zstd

Portage should have a USE flag adding app-arch/zstd as an RDEPEND to pull it in.
Comment 1 Ian Leonard 2020-04-25 23:07:06 UTC
Link to Github PR:

gentoo-bot failed to find it. ???
Comment 2 Mike Gilbert gentoo-dev 2020-04-25 23:49:40 UTC
We don't have use flags for gzip, bzip2, xz, etc. I don't think we need/want one for zstd.
Comment 3 Ian Leonard 2020-04-26 01:15:27 UTC
gzip, bzip2, and xz-utils are each part of the @system set, so don't need USE flags.
Comment 4 Zac Medico gentoo-dev 2020-04-26 04:19:01 UTC
According to the devmanual, a USE flag should not control runtime dependencies when the package does not link to it:

Yes, the policy is sometimes violated, but we should have a good reason if we violate it.

If we do it for zstd, then we also need to do it for lz4 if we're going to be consistent.
Comment 5 Mike Gilbert gentoo-dev 2020-04-26 04:35:40 UTC
I don’t see a good reason for a USE flag. Maybe mention it in the documentation instead.
Comment 6 Zac Medico gentoo-dev 2020-04-26 21:09:02 UTC
If we change the default to zstd as in bug 715108, and we make it conditional on USE=zstd, then there's an excuse to add the USE flag.
Comment 7 Larry the Git Cow gentoo-dev 2020-05-03 20:32:28 UTC
The bug has been referenced in the following commit(s):

commit 73acbb1a7f235f3eeda6a289684e4f43ffdd7dd6
Author:     Zac Medico <>
AuthorDate: 2020-04-26 21:53:49 +0000
Commit:     Zac Medico <>
CommitDate: 2020-05-03 20:27:15 +0000

    make.globals: add default BINPKG_COMPRESS setting (bug 715108)
    The ebuild will have a default enabled USE=zstd which changes the
    default to zstd here.
    Reviewed-by: Brian Dolbec <>
    Signed-off-by: Zac Medico <>

 cnf/make.globals | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 8 Larry the Git Cow gentoo-dev 2020-05-05 23:56:51 UTC
The bug has been referenced in the following commit(s):

commit 6a381b421b8283c73c2bd6e5d4e4a46cbe9a43a2
Author:     Ian Leonard <>
AuthorDate: 2020-04-25 20:32:57 +0000
Commit:     Zac Medico <>
CommitDate: 2020-05-05 23:56:43 +0000

    sys-apps/portage: add zstd USE flag
    The zstd USE flag sets the default binary package compression to use
    zstd and adds it as a dependency.
    Masked on riscv until app-arch/zstd is keyworded.
    Signed-off-by: Ian Leonard <>
    Signed-off-by: Zac Medico <>

 profiles/arch/riscv/package.use.mask | 4 ++++
 sys-apps/portage/portage-9999.ebuild | 9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
Comment 9 Larry the Git Cow gentoo-dev 2020-05-07 16:15:00 UTC
The bug has been referenced in the following commit(s):

commit e435225e72637d8383e06b0e0244c697e4d1423f
Author:     Ian Leonard <>
AuthorDate: 2020-05-07 15:51:38 +0000
Commit:     Zac Medico <>
CommitDate: 2020-05-07 16:12:27 +0000

    sys-apps/portage: convert USE zstd to USE flag binpkg-zstd
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Ian Leonard <>
    Signed-off-by: Zac Medico <>

 profiles/arch/riscv/package.use.mask | 4 ++--
 sys-apps/portage/metadata.xml        | 1 +
 sys-apps/portage/portage-9999.ebuild | 6 +++---
 3 files changed, 6 insertions(+), 5 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2020-05-25 00:24:03 UTC
The bug has been referenced in the following commit(s):

commit 77960c6cf984530dbcab9fe507e170e7a2fe7dcf
Author:     Zac Medico <>
AuthorDate: 2020-05-25 00:20:07 +0000
Commit:     Zac Medico <>
CommitDate: 2020-05-25 00:20:58 +0000

    sys-apps/portage: Bump to version 2.3.100
     #715108 Change default BINPKG_COMPRESS to zstd
     #719456 Add dependency on app-arch/zstd
     #720866 Do not set PKG_CONFIG_PATH
     #721402 Hostname UnicodeEncodeError surrogates not allowed
     #721516 Suppress precompressed QA notice for docompress -x
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Zac Medico <>

 sys-apps/portage/Manifest               |   1 +
 sys-apps/portage/portage-2.3.100.ebuild | 261 ++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)