craft_parts.state_manager.reports module

Provide a report on why a step is outdated.

class craft_parts.state_manager.reports.Dependency(part_name, step)[source]

Bases: object

The part and step that are a prerequisite to another step.

Parameters:
  • part_name (str)

  • step (Step)

part_name: str
step: Step
class craft_parts.state_manager.reports.DirtyReport(*, dirty_properties=None, dirty_project_options=None, changed_dependencies=None)[source]

Bases: object

The DirtyReport class explains why a given step is dirty.

A dirty step is defined to be a step that has run, but since doing so one of the following things have happened:

  • One or more properties used by the step have changed.

  • One of more project options have changed.

  • One of more of its dependencies have been re-staged.

Parameters:
  • dirty_properties (Optional[list[str]])

  • dirty_project_options (Optional[list[str]])

  • changed_dependencies (Optional[list[Dependency]])

reason()[source]

Get summarized report.

Return type:

str

Returns:

Short summary of why the part is dirty.

class craft_parts.state_manager.reports.OutdatedReport(*, previous_step_modified=None, source_modified=False, outdated_files=None, outdated_dirs=None)[source]

Bases: object

The OutdatedReport class explains why a given step is outdated.

An outdated step is defined to be a step that has run, but since doing so one of the following things have happened:

  • A step earlier in the lifecycle has run again.

  • The source on disk has been updated.

Parameters:
  • previous_step_modified (Optional[Step])

  • source_modified (bool)

  • outdated_files (Optional[list[str]])

  • outdated_dirs (Optional[list[str]])

reason()[source]

Get summarized report.

Return type:

str

Returns:

Short summary of why the step is outdated.