Bug 4625

Summary: Delete build information
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: bluelightning, david.reyna, jessica.zhang
Version: unspecified   
Target Milestone: 1.6 M5   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Belen Barros Pena 2013-06-07 10:52:55 UTC
I want to delete information stored for a certain build(s). 

The minimum unit of deletion is a build (I can not delete part of the information for a single build), and it was also suggested to provide date-based deletion (delete data for builds started / completed between this day and this day). 

The question was raised of what's deleted: the information in the database only, or the build output as well? No conclusive answer yet.
Comment 1 Alexandru Damian 2013-08-07 11:07:14 UTC
The ugly workaround is to erase and recreate the database.
Comment 2 Belen Barros Pena 2014-02-19 17:39:02 UTC
Alex has suggested to add a command to Django through manage.py to avoid any security issues (the GUI has no authentication built in).
Comment 3 Alexandru Damian 2014-02-19 18:36:45 UTC
This should be solved with a bldviewer command addition for manage.py:

- listbuilds :should get a user-readable tabbed list of build ids and identification information
- deletebuild id  :should delete the build with the specified id AND ALL related information (traversing the ForeignKey relationships recursively) from the database.
Comment 4 Belen Barros Pena 2014-03-19 16:36:29 UTC
This was merged sometime
Comment 5 Belen Barros Pena 2014-03-19 16:45:41 UTC
mmm, maybe I spoke too soon. Running 

./manage.py buildslist 

returns an error saying

DatabaseError: no such table: orm_build

This is on master:ac4ff568f5b2ad4f50a1b7b60797e7b797c314bb
Comment 6 Belen Barros Pena 2014-03-24 12:08:49 UTC
Scott has already provided the content relevant to this issue, which will be published in the Yocto Project wiki for 1.6 release.
Comment 7 Belen Barros Pena 2014-03-26 11:08:40 UTC
my bad: this is working, but if you are using the standard configuration you need to issue the commands from the /poky/build directory.
Comment 8 Belen Barros Pena 2014-03-26 11:09:14 UTC
verified in master:39846ddbce87d26eb68870914bf86a8ce5e86e5c