aura icon indicating copy to clipboard operation
aura copied to clipboard

Add a way to clean build directories prior to successfully building a package / in general

Open ultimatespirit opened this issue 1 month ago • 0 comments

This is a followup from https://github.com/fosskers/aura/issues/955#issuecomment-3615016691.

As part of the linked issue we found that, at least to the best of my knowledge, in the event a PKGBUILD cannot successfully build if invoked in an unclean build directory, as aura does on re-runs when not invoked with --clean, there is no in-built method to recover for aura. Users would have to manually execute some sort of rm -rf $XDG_CACHE_DIR/aura/builds/<package> command or similar.

It would be useful to have some way to force a build directory cleaning prior to building a package, rather than after building a successful package.

Similarly, perhaps the aura cache subcommand could be extended to be able to operate upon cache/aura/builds as well, for those of us who don't use --clean as it seems the builds directory just grows without bound with old built packages otherwise currently.

$ du -hcs aura/builds/dropbox/*
4.0K	aura/builds/dropbox/DropboxGlyph_Blue.svg
112M	aura/builds/dropbox/dropbox-lnx.x86_64-205.4.5765.tar.gz
4.0K	aura/builds/dropbox/dropbox-lnx.x86_64-205.4.5765.tar.gz.asc
109M	aura/builds/dropbox/dropbox-lnx.x86_64-211.4.6008.tar.gz
4.0K	aura/builds/dropbox/dropbox-lnx.x86_64-211.4.6008.tar.gz.asc
107M	aura/builds/dropbox/dropbox-lnx.x86_64-224.4.4811.tar.gz
4.0K	aura/builds/dropbox/dropbox-lnx.x86_64-224.4.4811.tar.gz.asc
69M	aura/builds/dropbox/dropbox-lnx.x86_64-234.4.5591.tar.gz
4.0K	aura/builds/dropbox/dropbox-lnx.x86_64-234.4.5591.tar.gz.asc
68M	aura/builds/dropbox/dropbox-lnx.x86_64-237.4.5655.tar.gz
4.0K	aura/builds/dropbox/dropbox-lnx.x86_64-237.4.5655.tar.gz.asc
4.0K	aura/builds/dropbox/dropbox.service
4.0K	aura/builds/dropbox/[email protected]
214M	aura/builds/dropbox/pkg
4.0K	aura/builds/dropbox/PKGBUILD
887M	aura/builds/dropbox/src
24K	aura/builds/dropbox/terms.txt
1.6G	total

At the very least being able to clear out the older final packages would be good housekeeping. The reason I don't use --clean by default is to aid in debugging in the event a successfully installed package still has issues, and in the hopes at least some of my installed PKGBUILDs can gain benefits from incremental re-builds (though that mainly would apply to -git packages I suppose). Though I see now at least a periodic full clean wouldn't be a bad idea (and one that can currently only be done through manual rm).

ultimatespirit avatar Dec 05 '25 02:12 ultimatespirit