Open mr-cal opened 5 days ago
the set can be created from what was staged, the file itself must come from what was staged
From an offline discussion with @cmatsuoka:
craft-parts
added a StateManager which tracks staged files per-part, this may now be a safe change.
Bug Description
craft-parts will fail if a
stage
andprime
are defined for a part andstage
removes a file.This can be fixed by changing this line:
I don't know if this is on purpose, but it has been like this since it was first added to craft-parts here.
source: https://github.com/canonical/snapcraft/issues/4835 from @dilyn-corner
To Reproduce
Create the filetree:
Create and run the python script:
import craft_parts from craft_parts import LifecycleManager, Step
logging.basicConfig(level=logging.DEBUG)
parts_yaml = """ parts: hello: plugin: dump source: src/ stage:
parts = yaml.safe_load(parts_yaml)
lcm = LifecycleManager( parts, application_name="example", cache_dir=".", )
with lcm.action_executor() as aex: aex.execute(lcm.plan(Step.PRIME))