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

Bug 481160

Summary: catalyst does not remove stage directories after successful builds
Product: Gentoo Hosted Projects Reporter: Markos Chandras (RETIRED) <hwoarang>
Component: CatalystAssignee: Gentoo Catalyst Developers <catalyst>
Status: RESOLVED FIXED    
Severity: normal CC: bkohler, catalyst, zerochaos
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 608058    
Bug Blocks:    

Description Markos Chandras (RETIRED) gentoo-dev 2013-08-15 13:08:48 UTC
catalyst fails to remove directories for stages were built successfully.

The are plenty of obsolete directories in /var/tmp/catalyst/tmp/default

eg

ls -la /var/tmp/catalyst/tmp/default/
total 56
drwxr-xr-x 14 root root 4096 Aug 15 04:51 .
drwxr-xr-x  4 root root 4096 Jul 24 02:25 ..
drwxrwxrwx  2 root root 4096 Jul 25 03:13 .autoresume-stage1-mips64el_multilib-20130725
drwxrwxrwx  2 root root 4096 Aug 13 01:41 .autoresume-stage1-mips64el_multilib-20130812
drwxrwxrwx  2 root root 4096 Aug 14 03:18 .autoresume-stage1-mips64el_multilib-20130814
drwxrwxrwx  2 root root 4096 Aug 15 01:30 .autoresume-stage1-mips64el_multilib-20130815
drwxrwxrwx  2 root root 4096 Aug 14 05:24 .autoresume-stage2-mips64el_multilib-20130814
drwxrwxrwx  2 root root 4096 Aug 15 03:30 .autoresume-stage2-mips64el_multilib-20130815
drwxrwxrwx  2 root root 4096 Aug 14 13:29 .autoresume-stage3-mips64el_multilib-20130814
drwxrwxrwx  2 root root 4096 Aug 15 06:05 .autoresume-stage3-mips64el_multilib-20130815
drwxrwxrwx 21 root root 4096 Aug 14 03:03 stage2-mips64el_multilib-20130814
drwxrwxrwx 21 root root 4096 Aug 15 01:24 stage2-mips64el_multilib-20130815
drwxrwxrwx 21 root root 4096 Aug 14 03:03 stage3-mips64el_multilib-20130814
drwxrwxrwx 21 root root 4096 Aug 15 01:24 stage3-mips64el_multilib-20130815

All of these stages were built successfully so the directories shouldn't be there.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2013-12-29 19:07:15 UTC
Just for an FYI, all these .autoresume files and build directories are not removed in current catalyst master's code either.  

But it is something that needs to be addressed.

For the build directories,  I think it would be best to put in a spec option to remove them after successful completion.  That way it is a users choice as to whether they are removed or not.
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-30 16:21:49 UTC
perhaps cleanup by default and have options="keepwork" like portage?
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2013-12-30 16:23:35 UTC
Also seedcache specifically requires the stage to not be cleaned up.  I personally find seedcache slows down my builds significanly, maybe that's just me.
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2013-12-31 10:49:23 UTC
I've made the needed changes to the 3.0 branch in catalyst.git.  Emerge catalyst 2.9999 to get them for testing.

To use it properly:

Add keepwork to the config options :  All work directories are kept.
Add seedcache to the config options:  Only the chroot (build) directory is saved.
Neither of those 2 above options   :  All work directories are removed.