)]}'
{"doc/source/developer/developing_elements.rst":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3a87067f747a8f6675cb4cc9bb3037909829bf70","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    * ``$TARGET_ROOT\u003d/path/to/target/workarea``"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"``exit.d``"},{"line_number":162,"context_line":"  Perform last minutes cleanups.  This is called when the"},{"line_number":163,"context_line":"  disk-image-builder exits - either because of a normal termination or"},{"line_number":164,"context_line":"  when an error occurs during the build process."},{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_566576df","line":162,"updated":"2016-06-06 00:29:25.000000000","message":"\"last minute\"","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"c75e8ed6835f092f927b7ab037ef76ff50b70f90","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    * ``$TARGET_ROOT\u003d/path/to/target/workarea``"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"``exit.d``"},{"line_number":162,"context_line":"  Perform last minutes cleanups.  This is called when the"},{"line_number":163,"context_line":"  disk-image-builder exits - either because of a normal termination or"},{"line_number":164,"context_line":"  when an error occurs during the build process."},{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_2ff48885","line":162,"in_reply_to":"7aa08908_566576df","updated":"2016-06-07 05:48:47.000000000","message":"Done","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3a87067f747a8f6675cb4cc9bb3037909829bf70","unresolved":false,"context_lines":[{"line_number":163,"context_line":"  disk-image-builder exits - either because of a normal termination or"},{"line_number":164,"context_line":"  when an error occurs during the build process."},{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"},{"line_number":166,"context_line":"  every point during the build process."},{"line_number":167,"context_line":"  Every resource that might be allocated for the element at some stage"},{"line_number":168,"context_line":"  must be immediately freed during this phase."},{"line_number":169,"context_line":"  The functions should be written in a way, that"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_16812e4b","line":166,"updated":"2016-06-06 00:29:25.000000000","message":"\"any point of the build process\"","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"c75e8ed6835f092f927b7ab037ef76ff50b70f90","unresolved":false,"context_lines":[{"line_number":163,"context_line":"  disk-image-builder exits - either because of a normal termination or"},{"line_number":164,"context_line":"  when an error occurs during the build process."},{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"},{"line_number":166,"context_line":"  every point during the build process."},{"line_number":167,"context_line":"  Every resource that might be allocated for the element at some stage"},{"line_number":168,"context_line":"  must be immediately freed during this phase."},{"line_number":169,"context_line":"  The functions should be written in a way, that"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_6fee90b5","line":166,"in_reply_to":"7aa08908_16812e4b","updated":"2016-06-07 05:48:47.000000000","message":"Done","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3a87067f747a8f6675cb4cc9bb3037909829bf70","unresolved":false,"context_lines":[{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"},{"line_number":166,"context_line":"  every point during the build process."},{"line_number":167,"context_line":"  Every resource that might be allocated for the element at some stage"},{"line_number":168,"context_line":"  must be immediately freed during this phase."},{"line_number":169,"context_line":"  The functions should be written in a way, that"},{"line_number":170,"context_line":"  * they are idempotent, i.e. they can be called any number of times:"},{"line_number":171,"context_line":"    removing an already removed or nonexistent resource must be no"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_b6e77a3f","line":168,"updated":"2016-06-06 00:29:25.000000000","message":"Not really sure what this is getting at ... maybe \"This phase can be used to cleanup or ensure the release of any resources the element has allocated\"?","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"c75e8ed6835f092f927b7ab037ef76ff50b70f90","unresolved":false,"context_lines":[{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"},{"line_number":166,"context_line":"  every point during the build process."},{"line_number":167,"context_line":"  Every resource that might be allocated for the element at some stage"},{"line_number":168,"context_line":"  must be immediately freed during this phase."},{"line_number":169,"context_line":"  The functions should be written in a way, that"},{"line_number":170,"context_line":"  * they are idempotent, i.e. they can be called any number of times:"},{"line_number":171,"context_line":"    removing an already removed or nonexistent resource must be no"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_cf2b44ea","line":168,"in_reply_to":"7aa08908_b6e77a3f","updated":"2016-06-07 05:48:47.000000000","message":"Done","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3a87067f747a8f6675cb4cc9bb3037909829bf70","unresolved":false,"context_lines":[{"line_number":168,"context_line":"  must be immediately freed during this phase."},{"line_number":169,"context_line":"  The functions should be written in a way, that"},{"line_number":170,"context_line":"  * they are idempotent, i.e. they can be called any number of times:"},{"line_number":171,"context_line":"    removing an already removed or nonexistent resource must be no"},{"line_number":172,"context_line":"    error.  A typical implementation in bash to free a resource might"},{"line_number":173,"context_line":"    be:"},{"line_number":174,"context_line":"       `check_if_resource_is_allocated \u0026\u0026 free_resource`"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_f6cf42b1","line":171,"updated":"2016-06-06 00:29:25.000000000","message":"\"must not raise an error\"","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"c75e8ed6835f092f927b7ab037ef76ff50b70f90","unresolved":false,"context_lines":[{"line_number":168,"context_line":"  must be immediately freed during this phase."},{"line_number":169,"context_line":"  The functions should be written in a way, that"},{"line_number":170,"context_line":"  * they are idempotent, i.e. they can be called any number of times:"},{"line_number":171,"context_line":"    removing an already removed or nonexistent resource must be no"},{"line_number":172,"context_line":"    error.  A typical implementation in bash to free a resource might"},{"line_number":173,"context_line":"    be:"},{"line_number":174,"context_line":"       `check_if_resource_is_allocated \u0026\u0026 free_resource`"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_0f36ec51","line":171,"in_reply_to":"7aa08908_f6cf42b1","updated":"2016-06-07 05:48:47.000000000","message":"Done","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3a87067f747a8f6675cb4cc9bb3037909829bf70","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    error.  A typical implementation in bash to free a resource might"},{"line_number":173,"context_line":"    be:"},{"line_number":174,"context_line":"       `check_if_resource_is_allocated \u0026\u0026 free_resource`"},{"line_number":175,"context_line":"  * they always exit with return code 0."},{"line_number":176,"context_line":"    Returning something else will immediately stop the exit phase and"},{"line_number":177,"context_line":"    the exit phase of other elements might not be called."},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_16cf6eb1","line":175,"updated":"2016-06-06 00:29:25.000000000","message":"I wonder if we should make efforts to limit this ... it seems we could make these phases immune to non-zero exits with some work.  just an idea","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"c75e8ed6835f092f927b7ab037ef76ff50b70f90","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    error.  A typical implementation in bash to free a resource might"},{"line_number":173,"context_line":"    be:"},{"line_number":174,"context_line":"       `check_if_resource_is_allocated \u0026\u0026 free_resource`"},{"line_number":175,"context_line":"  * they always exit with return code 0."},{"line_number":176,"context_line":"    Returning something else will immediately stop the exit phase and"},{"line_number":177,"context_line":"    the exit phase of other elements might not be called."},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_efeba076","line":175,"in_reply_to":"7aa08908_16cf6eb1","updated":"2016-06-07 05:48:47.000000000","message":"There would be the need to change dib-run-parts: an additional command line parameter must be added.  Also the run_d function must be extended.\nIt\u0027s not a big deal - maybe it\u0027s a cleaner and more robust approach.\nWhat do you think?","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"be1da6315124b6c3f076177c7f2b07302fed5b8b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    error.  A typical implementation in bash to free a resource might"},{"line_number":173,"context_line":"    be:"},{"line_number":174,"context_line":"       `check_if_resource_is_allocated \u0026\u0026 free_resource`"},{"line_number":175,"context_line":"  * they always exit with return code 0."},{"line_number":176,"context_line":"    Returning something else will immediately stop the exit phase and"},{"line_number":177,"context_line":"    the exit phase of other elements might not be called."},{"line_number":178,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7aa08908_e7070716","line":175,"in_reply_to":"7aa08908_efeba076","updated":"2016-06-07 23:47:35.000000000","message":"We should probably leave this as is and just take the KISS approach for now, but something to consider later if we need it","commit_id":"a575bd07c27a7aa096725894aa4ac27bffb6ac4f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"d0cc3bf71ec3c666a7288c7508642dd2176a09a5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"  * runs: **in chroot** "},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"``cleanup.d``"},{"line_number":151,"context_line":"  Perform cleanup of the root filesystem content. For instance, temporary"},{"line_number":152,"context_line":"  settings to use the image build environment HTTP proxy are removed here in"},{"line_number":153,"context_line":"  the dpkg element."},{"line_number":154,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"7aa08908_e73f0785","line":151,"updated":"2016-06-07 23:45:24.000000000","message":"see comment below, maybe add \"Perform cleanup of the root filesystem content on the normal termination path\"","commit_id":"2e6958b4ff0ab171dc3851f0779d67164761866a"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"d0cc3bf71ec3c666a7288c7508642dd2176a09a5","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    * ``$TARGET_ROOT\u003d/path/to/target/workarea``"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"``exit.d``"},{"line_number":162,"context_line":"  Perform last minute cleanups.  This is called when the"},{"line_number":163,"context_line":"  disk-image-builder exits - either because of a normal termination or"},{"line_number":164,"context_line":"  when an error occurs during the build process."},{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7aa08908_47c41b5e","line":162,"updated":"2016-06-07 23:45:24.000000000","message":"One last thing then I\u0027m +2 ... this is kind of \"burying the lede\" ... the important part to state first is that this is essentially a \"finally\" call and that\u0027s what differentiates it from \"cleanup.d\"\n\nSo maybe start with something like\n\n\"A final clean-up phase that is run irrespective of previous errors.  This phase should be used ensure the release of any resources the element has allocated.  Note it can be called asynchronously at any point; it is usually run as the last phase of the successful termination path, but may run earlier if a preceding phase raises an error\".","commit_id":"2e6958b4ff0ab171dc3851f0779d67164761866a"},{"author":{"_account_id":10035,"name":"greghaynes","email":"greg@greghaynes.net","username":"greghaynes"},"change_message_id":"5c293ad57cdf93ea0234cc50f86c387b8e37e646","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    * ``$TARGET_ROOT\u003d/path/to/target/workarea``"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"``exit.d``"},{"line_number":162,"context_line":"  Perform last minute cleanups.  This is called when the"},{"line_number":163,"context_line":"  disk-image-builder exits - either because of a normal termination or"},{"line_number":164,"context_line":"  when an error occurs during the build process."},{"line_number":165,"context_line":"  When an error occurs, the exit phase can be called asynchronously at"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bacf61ea_5ab71a86","line":162,"in_reply_to":"7aa08908_47c41b5e","updated":"2016-07-28 16:43:30.000000000","message":"+1 on making the use case a bit more clear","commit_id":"2e6958b4ff0ab171dc3851f0779d67164761866a"}]}
