Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937037 - portage/emerge - a tool to cleanup tmpdir/workdir directories
Summary: portage/emerge - a tool to cleanup tmpdir/workdir directories
Status: CONFIRMED
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-08-01 08:01 UTC by riza.dindir
Modified: 2024-08-01 20:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A simple bash script for PORTAGE_TMPDIR cleanup (eclean-tmp.sh,985 bytes, application/x-shellscript)
2024-08-01 08:01 UTC, riza.dindir
Details

Note You need to log in before you can comment on or make changes to this bug.
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.