diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-07 21:52:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-07 21:57:16 +0100 |
commit | f4e0b265683c091fd1d7d96bc132d76955d89263 (patch) | |
tree | bde12e27590b69e18fdcace9372a819a05ad8a9d /scripts/lib | |
parent | 157a12d499ad83a2b3140d0524b8d664f7f4e154 (diff) | |
download | poky-f4e0b265683c091fd1d7d96bc132d76955d89263.tar.gz |
Revert "wic: Fix permissions when using exclude or include path"
This reverts commit 36993eea89d1c011397b7692b9b8d61b499d0171.
After discussion on the mailing list it was felt these changes
were not ready yet.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/plugins/source/rootfs.py | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index 40419a64b3..705aeb5563 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py | |||
@@ -16,11 +16,11 @@ import os | |||
16 | import shutil | 16 | import shutil |
17 | import sys | 17 | import sys |
18 | 18 | ||
19 | from oe.path import copyhardlinktree, copytree | 19 | from oe.path import copyhardlinktree |
20 | 20 | ||
21 | from wic import WicError | 21 | from wic import WicError |
22 | from wic.pluginbase import SourcePlugin | 22 | from wic.pluginbase import SourcePlugin |
23 | from wic.misc import get_bitbake_var, exec_native_cmd | 23 | from wic.misc import get_bitbake_var |
24 | 24 | ||
25 | logger = logging.getLogger('wic') | 25 | logger = logging.getLogger('wic') |
26 | 26 | ||
@@ -44,15 +44,6 @@ class RootfsPlugin(SourcePlugin): | |||
44 | 44 | ||
45 | return os.path.realpath(image_rootfs_dir) | 45 | return os.path.realpath(image_rootfs_dir) |
46 | 46 | ||
47 | @staticmethod | ||
48 | def __get_pseudo(native_sysroot, rootfs): | ||
49 | pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot | ||
50 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % os.path.join(rootfs, "../pseudo") | ||
51 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs | ||
52 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | ||
53 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") | ||
54 | return pseudo | ||
55 | |||
56 | @classmethod | 47 | @classmethod |
57 | def do_prepare_partition(cls, part, source_params, cr, cr_workdir, | 48 | def do_prepare_partition(cls, part, source_params, cr, cr_workdir, |
58 | oe_builddir, bootimg_dir, kernel_dir, | 49 | oe_builddir, bootimg_dir, kernel_dir, |
@@ -87,15 +78,8 @@ class RootfsPlugin(SourcePlugin): | |||
87 | 78 | ||
88 | if os.path.lexists(new_rootfs): | 79 | if os.path.lexists(new_rootfs): |
89 | shutil.rmtree(os.path.join(new_rootfs)) | 80 | shutil.rmtree(os.path.join(new_rootfs)) |
90 | copyhardlinktree(part.rootfs_dir, new_rootfs) | ||
91 | 81 | ||
92 | if os.path.lexists(os.path.join(new_rootfs, "../pseudo")): | 82 | copyhardlinktree(part.rootfs_dir, new_rootfs) |
93 | shutil.rmtree(os.path.join(new_rootfs, "../pseudo")) | ||
94 | copytree(os.path.join(part.rootfs_dir, "../pseudo"), | ||
95 | os.path.join(new_rootfs, "../pseudo")) | ||
96 | pseudo_cmd = "%s -B -m %s -M %s" % (cls.__get_pseudo(native_sysroot,new_rootfs), | ||
97 | part.rootfs_dir, new_rootfs) | ||
98 | exec_native_cmd(pseudo_cmd, native_sysroot) | ||
99 | 83 | ||
100 | for path in part.include_path or []: | 84 | for path in part.include_path or []: |
101 | copyhardlinktree(path, new_rootfs) | 85 | copyhardlinktree(path, new_rootfs) |