-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared directories are not properly cleaned when partitions are enabled #665
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2928.
|
BackgroundThis was not an issue in the first implementation of partitions #517. This issue arose when we got the unexpected and rushed requirement to redesign (#620) and evolve the first implementation. We documented it in ST106:
Next steps@cmatsuoka and I have discussed this at length and failed a few times via CRAFT-2583. There is no simple or non-hacky solution. The StateManager is designed to work with a single lifecycle with a single set stage, prime, and install directories. The StateManager is tangled in the lifecycle execution from top to bottom - there is no clean API separation. Partitions are an incomplete implementation of a grandiose concept of multiple lifecycles. Lacking multiple lifecycles, partitions are simply embedded into the execution of a single lifecycle. Because of this, there isn't a good design for the StateManager to handle partitions or even clean files from a partition. A hacky solution is to make the The correct solution would be a refactoring of craft-parts to properly manage multiple lifecycles. In this case, |
What needs to get done
clean_shared_area()
function to remove the correct files from the list of tracked files from theStateManager
's state filesThe solution could leverage the data structures added by #664.
Why it needs to get done
If the same file exists in multiple partitions in a shared directory (
stage
orprime
), cleaning doesn't work as expected. It will indiscriminately remove the file from all partitions. See this test for an example.This is because the
StateManager
does not track files per-partition.The text was updated successfully, but these errors were encountered: