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

Bug 937037

Summary: portage/emerge - a tool to cleanup tmpdir/workdir directories
Product: Portage Development Reporter: riza.dindir
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: zmedico
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=934382
https://bugs.gentoo.org/show_bug.cgi?id=731736
https://bugs.gentoo.org/show_bug.cgi?id=505284
https://bugs.gentoo.org/show_bug.cgi?id=470880
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: A simple bash script for PORTAGE_TMPDIR cleanup

Description riza.dindir 2024-08-01 08:01:45 UTC
Created attachment 898737 [details]
A simple bash script for PORTAGE_TMPDIR cleanup

When building a package with FEATURE=keepwork the generated files will not be cleaned.

I am using FEATURE=keepwork for packages that I know might take a long time, so that I can resume the build when I restart/relogin my system.

To make the cleanup easier, I am proposing a tool, named like eclean-tmp for example, to cleanup the tmp/work directories. This tool will also take into account already running emerges. With such a tool, the user does not need to remember the tmp directory path for PORTAGE_TMPDIR, or look it up with "emerge --info".

I have written such a script. This script is by no means finished. But I wanted to share that script so that it might be included into the system.

I am new to gentoo. Therefore the script might not take into account certain guidelines, standards that might be defined for gentoo. Maybe this should have been written in python.

This might also be related to bug 470880.
Comment 1 Zac Medico gentoo-dev 2024-08-01 19:38:02 UTC
An emaint module to automate this kind of PORTAGE_TMPDIR cleanup seems like it would be helpful, especially in the context of bug 934382 where the space usage begins to affect job scheduling.