diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-02-09 00:16:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-14 08:40:59 +0000 |
commit | 4dce5c44ab1a184247a18df28c34f94b2d332b1e (patch) | |
tree | 6b9b2bacf48de750f0d36c685075997de0f9f34b /scripts/lib/wic | |
parent | cf3e21e71e6815b76d58d018719e8bf7ec977d7b (diff) | |
download | poky-4dce5c44ab1a184247a18df28c34f94b2d332b1e.tar.gz |
wic: remove useless calls to __write_fstab
__write_fstab() is already iterating over parts. There is now need to
call it fort each parts.
(From OE-Core rev: 0a6668f6e60b4195ff4163c00fc972bacdb27b4b)
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/imager/direct.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 38d4e78e62..c605e64238 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py | |||
@@ -136,7 +136,7 @@ class DirectImageCreator(BaseImageCreator): | |||
136 | fstab_lines.append(fstab_entry) | 136 | fstab_lines.append(fstab_entry) |
137 | 137 | ||
138 | def _write_fstab(self, fstab, fstab_lines): | 138 | def _write_fstab(self, fstab, fstab_lines): |
139 | fstab = open(fstab, "w") | 139 | fstab = open(fstab + ".new", "w") |
140 | for line in fstab_lines: | 140 | for line in fstab_lines: |
141 | fstab.write(line) | 141 | fstab.write(line) |
142 | fstab.close() | 142 | fstab.close() |
@@ -258,12 +258,9 @@ class DirectImageCreator(BaseImageCreator): | |||
258 | # self.assemble() calls Image.assemble() which calls | 258 | # self.assemble() calls Image.assemble() which calls |
259 | # __write_partitition() for each partition to dd the fs | 259 | # __write_partitition() for each partition to dd the fs |
260 | # into the partitions. | 260 | # into the partitions. |
261 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
262 | |||
263 | p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, | 261 | p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, |
264 | self.bootimg_dir, self.kernel_dir, self.native_sysroot) | 262 | self.bootimg_dir, self.kernel_dir, self.native_sysroot) |
265 | 263 | ||
266 | self._restore_fstab(fstab) | ||
267 | 264 | ||
268 | self.__image.add_partition(int(p.size), | 265 | self.__image.add_partition(int(p.size), |
269 | p.disk, | 266 | p.disk, |
@@ -277,6 +274,9 @@ class DirectImageCreator(BaseImageCreator): | |||
277 | no_table = p.no_table, | 274 | no_table = p.no_table, |
278 | part_type = p.part_type) | 275 | part_type = p.part_type) |
279 | 276 | ||
277 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
278 | self._restore_fstab(fstab) | ||
279 | |||
280 | self.__image.layout_partitions(self._ptable_format) | 280 | self.__image.layout_partitions(self._ptable_format) |
281 | 281 | ||
282 | self.__imgdir = self.workdir | 282 | self.__imgdir = self.workdir |