Skip to content

Allow exclusion or selective inclusion of input files - #115

Open
mschwan-phytec wants to merge 9 commits into
mainfrom
wip-input-options
Open

mschwan-phytec wants to merge 9 commits into
mainfrom
wip-input-options

Conversation

@mschwan-phytec

@mschwan-phytec mschwan-phytec commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Allow restricting the paths of an input with the new input options
"exclude" and "only". For tar archives, the paths are passed to tar
during extraction. For all other inputs, the paths are removed from the
partition after writing. Relative paths are resolved against the root of
the partition and may contain wildcards. "exclude" takes precedence over
"only".

@mschwan-phytec
mschwan-phytec force-pushed the wip-input-options branch 7 times, most recently from 86fc670 to 455f68b Compare November 13, 2026 08:37
Allow restricting the paths of an input with the new input options
"exclude" and "only". For tar archives, the paths are passed to tar
during extraction. For all other inputs, the paths are removed from the
partition after writing. Relative paths are resolved against the root of
the partition and may contain wildcards. "exclude" takes precedence over
"only".

Also shell-quote all arguments passed to tar.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Bump version early now, so the development version can be used with the
newly introduced selective exclusion/inclusion feature.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Test extracting archives and removing paths from a directory with
exclude and only lists, including wildcards, relative paths and paths
outside of the root directory.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Add tests for parsing a layout config with the input options exclude and
only, and for a config with an invalid exclude entry.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Describe the input options exclude and only, how their paths are
interpreted for tar archives and for other inputs, and add an example.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Add a layout using the input options exclude and only to the system
tests and add the directory structure archive to the test packages.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Allow running a verification script, which has the same basename as it
corresponding YAML layout config file. This is meant for checking the
desired output.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Add a verification script for the "exclude-only.yaml" layout
configuration, which checks the resulting partitions for the desired
files and directories.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
@mschwan-phytec
mschwan-phytec marked this pull request as ready for review November 13, 2026 09:17

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant