craft_parts.sequencer module

Determine the sequence of lifecycle actions to be executed.

class craft_parts.sequencer.Sequencer(*, part_list, project_info, ignore_outdated=None, base_layer_hash=None)[source]

Bases: object

Obtain a list of actions from the parts specification.

The sequencer takes the parts definition and the current state of a project to plan all the actions needed to reach a given target step. State is read from persistent storage and updated entirely in memory. Sequencer operations never change disk contents.

  • part_list (List[Part]) – The list of parts to process.

  • project_info (ProjectInfo) – Information about this project.

  • ignore_outdated (Optional[List[str]]) – A list of file patterns to ignore when testing for outdated files.

  • base_layer_hash (Optional[LayerHash]) –

plan(target_step, part_names=None)[source]

Determine the list of steps to execute for each part.

  • target_step (Step) – The final step to execute for the given part names.

  • part_names (Optional[Sequence[str]]) – The names of the parts to process.

Return type:



The list of actions that should be executed.


Reload state from persistent storage.

Return type: