mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-07 04:58:57 +00:00
arm-autonomy/arm-autonomy-host-image-minimal: Resolve guest path if symlink
In ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS, remove fatal error if guest path is a symlink, and instead resolve using os.path.realpath. Issue-Id: SCM-638 Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com> Change-Id: Ic4fdd7ae03ed6bb6caa55e722b89114080c90f4c Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -106,7 +106,14 @@ python add_extern_guests () {
|
|||||||
_, _, path, _, _, parm = bb.fetch.decodeurl(entry)
|
_, _, path, _, _, parm = bb.fetch.decodeurl(entry)
|
||||||
if 'guestname' in parm:
|
if 'guestname' in parm:
|
||||||
if os.path.islink(path):
|
if os.path.islink(path):
|
||||||
bb.fatal("Guest file is a symlink: " + path)
|
realpath = os.path.realpath(path)
|
||||||
|
|
||||||
|
if not os.path.exists(realpath):
|
||||||
|
bb.fatal("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS link does not resolve: " + path)
|
||||||
|
|
||||||
|
bb.note("Guest file is a symlink:\n " + path + "\nResolved to:\n " + realpath)
|
||||||
|
path = realpath
|
||||||
|
|
||||||
bb.utils.mkdirhier(guestdir)
|
bb.utils.mkdirhier(guestdir)
|
||||||
dstname = parm['guestname']
|
dstname = parm['guestname']
|
||||||
# Add file extension if not there
|
# Add file extension if not there
|
||||||
|
|||||||
Reference in New Issue
Block a user