Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943331 - Switch to delete, not keep distfiles
Summary: Switch to delete, not keep distfiles
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 17:23 UTC by Cedric Sodhi
Modified: 2024-11-12 17:31 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 Cedric Sodhi 2024-11-12 17:23:43 UTC
When running a larger job such as emerging an entire system or just packages with a lot of dependencies, $DISTFILES can accumulate gigabytes of tarballs which can exceed what would normally be reasonable storage limits, or be otherwise undesireable.

Albeit there surely can be instances in which it is convenient to cache previously downloaded source files, I think this is rarely the case on a normal system in day-to-day operations (about the ratio of non-update rebuilds, which I think is less than 5% for me). In my opinion, portage should not assume that to be the default and much less so not offer any option to delete sources after they have been used.

A switch to delete source files after the build process would be helpful here, because the trick with the `post_postinst` hook feels flimsy and hackish.
Comment 1 Andreas Sturmlechner gentoo-dev 2024-11-12 17:25:34 UTC
That surely won't happen as a default, as it would be a massive and unexpected behaviour change.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-12 17:26:02 UTC
Changing the default would mean a higher load on mirrors. I also disagree wrt "non-update rebuilds" because any revbumps, changed-use rebuilds, and so on will use the same distfiles and those are common.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-12 17:28:52 UTC
https://wiki.gentoo.org/wiki/Knowledge_Base:Remove_obsoleted_distfiles even mentions a possible hook.

I don't think we want to do this. It would also break people sharing distfiles via e.g. NFS, and potentially incur unexpected costs for people on bandwidth-limited/capped connections.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-12 17:31:56 UTC
I think I misinterpreted your title -- do you want to change the default or add an option? I'm still not sure we should add an option, but the title could read both ways.