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

Bug 630132

Summary: sys-apps/portage-2.3.8: BINPKG_COMPRESS="zstd" does not work
Product: Portage Development Reporter: Martin Väth <martin>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 631448    

Description Martin Väth 2017-09-07 05:56:02 UTC
BINPKG_COMPRESS="zstd" does not work:
It produces a tbz2 file, but atttempting to emerge the corresponding binary package results in "random" errors, usually in the message that this is not a zstd archive.

I conjecture that a reason is that portage does not strip the extra bytes before passing the archive to unzstd: It is a feature of unzstd that subsequent data is considered as a concatenation of a further archive which might result in the corresponding error message (and explains why sometimes also strange messages like "not enough memory for the table" are output, depending on the extra data).

Maybe other archive formats have similar issues; I have not tried any further.
Comment 1 Zac Medico gentoo-dev 2017-09-07 06:57:08 UTC
Maybe we'll have to pipe the file through 'head' in order to strip the xpak trailer, or something like that.
Comment 2 Zac Medico gentoo-dev 2017-10-04 01:34:49 UTC
This is in the master branch:

https://github.com/gentoo/portage/commit/b4b0e6b0aaa1feb405823277b82ebb2e4820e0b8