diff options
author | Ross Burton <ross.burton@intel.com> | 2019-12-05 21:12:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-28 23:25:41 +0000 |
commit | 1ac2b6c82f4860a7081ef9b5adc7783e674d3a15 (patch) | |
tree | f93eb0eeab04fea9f3044a7b6258e690277de0c4 /meta | |
parent | baf505a0b8001c4767a92f6e95c041a13bfea788 (diff) | |
download | poky-1ac2b6c82f4860a7081ef9b5adc7783e674d3a15.tar.gz |
rootfs: don't use oe.cachedpath
Unless cachedpath is used correctly then it's just a glorified clone of
os.walk, but without any of the recent optimisations in os.walk. In
this codepath there is no point to using cachedpath.
(From OE-Core rev: 765e0c3410d6bf3b4a50c4a036f555eae760acd2)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/rootfs.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index c62fa5f54a..cd65e62030 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -126,17 +126,16 @@ class Rootfs(object, metaclass=ABCMeta): | |||
126 | bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(dir)) | 126 | bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(dir)) |
127 | shutil.copytree(self.image_rootfs + '-orig' + dir, self.image_rootfs + dir, symlinks=True) | 127 | shutil.copytree(self.image_rootfs + '-orig' + dir, self.image_rootfs + dir, symlinks=True) |
128 | 128 | ||
129 | cpath = oe.cachedpath.CachedPath() | ||
130 | # Copy files located in /usr/lib/debug or /usr/src/debug | 129 | # Copy files located in /usr/lib/debug or /usr/src/debug |
131 | for dir in ["/usr/lib/debug", "/usr/src/debug"]: | 130 | for dir in ["/usr/lib/debug", "/usr/src/debug"]: |
132 | src = self.image_rootfs + '-orig' + dir | 131 | src = self.image_rootfs + '-orig' + dir |
133 | if cpath.exists(src): | 132 | if os.path.exists(src): |
134 | dst = self.image_rootfs + dir | 133 | dst = self.image_rootfs + dir |
135 | bb.utils.mkdirhier(os.path.dirname(dst)) | 134 | bb.utils.mkdirhier(os.path.dirname(dst)) |
136 | shutil.copytree(src, dst) | 135 | shutil.copytree(src, dst) |
137 | 136 | ||
138 | # Copy files with suffix '.debug' or located in '.debug' dir. | 137 | # Copy files with suffix '.debug' or located in '.debug' dir. |
139 | for root, dirs, files in cpath.walk(self.image_rootfs + '-orig'): | 138 | for root, dirs, files in os.walk(self.image_rootfs + '-orig'): |
140 | relative_dir = root[len(self.image_rootfs + '-orig'):] | 139 | relative_dir = root[len(self.image_rootfs + '-orig'):] |
141 | for f in files: | 140 | for f in files: |
142 | if f.endswith('.debug') or '/.debug' in relative_dir: | 141 | if f.endswith('.debug') or '/.debug' in relative_dir: |