1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-15 15:37:03 +00:00

wic: Add --include-path argument

This option adds the contents of the given path to a partition built
with the rootfs source plugin. The path is relative to the directory in
which wic is running not the rootfs itself so use of an absolute path
is recommended. This option is most useful when multiple copies of the
rootfs are added to an image and it is required to add extra content to
only one of these copies. This option only has an effect with the
rootfs source plugin.

(From OE-Core rev: d4cd27a9837426e809190548a83c6c7c76505114)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Barker
2020-01-08 11:25:46 +00:00
committed by Richard Purdie
parent ab6e8dae1e
commit 2c81446248
5 changed files with 72 additions and 20 deletions
+5 -2
View File
@@ -71,7 +71,7 @@ class RootfsPlugin(SourcePlugin):
new_rootfs = None
# Handle excluded paths.
if part.exclude_path is not None:
if part.exclude_path or part.include_path:
# We need a new rootfs directory we can delete files from. Copy to
# workdir.
new_rootfs = os.path.realpath(os.path.join(cr_workdir, "rootfs%d" % part.lineno))
@@ -81,7 +81,10 @@ class RootfsPlugin(SourcePlugin):
copyhardlinktree(part.rootfs_dir, new_rootfs)
for orig_path in part.exclude_path:
for path in part.include_path or []:
copyhardlinktree(path, new_rootfs)
for orig_path in part.exclude_path or []:
path = orig_path
if os.path.isabs(path):
logger.error("Must be relative: --exclude-path=%s" % orig_path)