Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926281 - go-module.eclass: "dependency tarball" example produces tarballs with duplicate files
Summary: go-module.eclass: "dependency tarball" example produces tarballs with duplica...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-06 19:11 UTC by Michał Górny
Modified: 2024-03-06 19:17 UTC (History)
1 user (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 2024-03-06 19:11:41 UTC
The commands provided to generate dependency tarballs in go-module.eclass produce tarballs with duplicate files, that are much larger than they need to be.

The `go-mod` directory ends up containing a `cache` subdirectory that includes downloaded .zip archives of Go packages, and other subdirectories containing the same packages unpacked from these .zip archives.  Not only is the data duplicated — but since one copy is deflate-compressed, they end up being compressed inefficiently.

If I removed all .zip files, go-module.eclass seems to be able to build, test and install the package without issue.  Not sure which other files can be removed.

For app-misc/siegfried-1.11.0, the archive is almost 2.5x smaller:

original command: 31M
after removing .zip files: 13M