summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/rootfs.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-28 12:29:24 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:46:19 +0100
commit5541191b9987ea194bcb55a913cf92f6f3679b42 (patch)
tree047b375c3f5f855e4e37f499b648f3f1762c80a9 /scripts/lib/wic/plugins/source/rootfs.py
parentc4f9d8151fb680570d89bdbc9f969c8d9760091c (diff)
downloadpoky-5541191b9987ea194bcb55a913cf92f6f3679b42.tar.gz
wic: use absolute paths in rootfs plugin
Using relative paths can cause copyhardlinktree API to fail as it changes current directory when working. Converted all paths to absolute paths using os.path.realpath. (From OE-Core rev: a1c83cebe986e211dfc31be5cbd748f53fc298df) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins/source/rootfs.py')
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 4dc4cb851d..c08f7600ce 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -48,7 +48,7 @@ class RootfsPlugin(SourcePlugin):
48 @staticmethod 48 @staticmethod
49 def __get_rootfs_dir(rootfs_dir): 49 def __get_rootfs_dir(rootfs_dir):
50 if os.path.isdir(rootfs_dir): 50 if os.path.isdir(rootfs_dir):
51 return rootfs_dir 51 return os.path.realpath(rootfs_dir)
52 52
53 image_rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", rootfs_dir) 53 image_rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", rootfs_dir)
54 if not os.path.isdir(image_rootfs_dir): 54 if not os.path.isdir(image_rootfs_dir):
@@ -56,7 +56,7 @@ class RootfsPlugin(SourcePlugin):
56 "named %s has been found at %s, exiting." % 56 "named %s has been found at %s, exiting." %
57 (rootfs_dir, image_rootfs_dir)) 57 (rootfs_dir, image_rootfs_dir))
58 58
59 return image_rootfs_dir 59 return os.path.realpath(image_rootfs_dir)
60 60
61 @classmethod 61 @classmethod
62 def do_prepare_partition(cls, part, source_params, cr, cr_workdir, 62 def do_prepare_partition(cls, part, source_params, cr, cr_workdir,