]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
wic/rootfs.py: allow --exclude-path option to exclude symlinks
authorYi Zhao <yi.zhao@eng.windriver.com>
Fri, 11 Oct 2024 09:19:35 +0000 (17:19 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Oct 2024 12:33:13 +0000 (13:33 +0100)
commit42e829ac1e9d74646b6dfb327b18b15f6b0df60b
tree9b366722acdd15c7f083cf8dac24312d57d62151
parent9284ceb4d32a51c77792d9009bba400d0b17d731
wic/rootfs.py: allow --exclude-path option to exclude symlinks

Currently, if we specify a symbolic link in --exclude-path option,
we will get the following error in do_image_wic:

ERROR: --exclude-path: Must point inside the rootfs: usr/bin/hello.link

This is because it uses os.path.realpath to eliminate symbolic links. To
exclude symbolic links, use os.path.abspath instead of os.path.realpath.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/source/rootfs.py