← Back to issue list

`organize` with mapping like `{app: app/app}` when `app` is a directory not working as expected.

View original Github issue

Metadata

Project
craft-parts
Number
#1460
Type
issue
State
open
Author
javierdelapuente
Labels
Created
2026-02-17 07:24:38+00:00
Updated
2026-03-02 12:30:26+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description When a part with `organize` contains in the a mapping like `{"app": "app/app"} and the source "app" is a directory, the source is not organized to the desired directory. In other organize cases, like `{"app": "app2/app"}`, it works correctly as expected. Related to: https://github.com/canonical/rockcraft/issues/892 Looks related to this line: https://github.com/canonical/craft-parts/blob/b654a77fd4e41ddc8d520bda039e5c38560fc42c/craft_parts/executor/organize.py#L85 ### To Reproduce Using this `rorkcraft.yaml` file: ``` name: example base: ubuntu@24.04 version: '0.1' summary: Summary description: | Description platforms: amd64: parts: simpla-part: plugin: dump source: . organize: app: app/app stage: - app/app ``` and commands: ``` mkdir app touch app/file.txt ``` `rockcraft pack` fails with (when executing the `stage`, as `app/app` does not exist): ``` ubuntu@worklaptop:~/example$ rockcraft pack /root/parts/simpla-part/install/app: No such file or directory Detailed information: FileNotFoundError: filename: '/root/parts/simpla-part/install/app' ``` I would expect the correct output structure is generated in this case. ### part yaml ```shell fastapi-framework/install-app: plugin: dump source: . organize: app: app/app stage: - app/app ``` ### Relevant log output ```shell - ```

Evaluation history

No evaluation history available.