From 87c07470ad1d37841dcb594c53715ea3518bd4e9 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 16 Mar 2012 11:25:27 +0000 Subject: SystemBuilder: add newlines to fstab f.write does not add them --- morphlib/builder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'morphlib/builder.py') diff --git a/morphlib/builder.py b/morphlib/builder.py index 6894c318..bf607d34 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -503,9 +503,9 @@ class SystemBuilder(BlobBuilder): # pragma: no cover if not os.path.exists(os.path.dirname(fstab)): os.makedirs(os.path.dirname(fstab)) with open(fstab, 'w') as f: - f.write('proc /proc proc defaults 0 0') - f.write('sysfs /sys sysfs defaults 0 0') - f.write('/dev/sda1 / ext4 errors=remount-ro 0 1') + f.write('proc /proc proc defaults 0 0\n') + f.write('sysfs /sys sysfs defaults 0 0\n') + f.write('/dev/sda1 / ext4 errors=remount-ro 0 1\n') def _install_extlinux(self, mount_point): with self.build_watch('install-bootloader'): -- cgit v1.2.1 From 5c52cf732a36232a9d20fc70943aefea3b7c9781 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 16 Mar 2012 11:25:35 +0000 Subject: tar: add -h option to extraction This should stop tar from replacing symbolic links with directories and instead follow the symbolic links, extracting the files into the linked directories --- morphlib/builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'morphlib/builder.py') diff --git a/morphlib/builder.py b/morphlib/builder.py index bf607d34..c3e71c09 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -494,7 +494,7 @@ class SystemBuilder(BlobBuilder): # pragma: no cover with self.build_watch('unpack-strata'): for name, filename in self.stage_items: self.msg('unpack %s from %s' % (name, filename)) - self.ex.runv(['tar', '-C', mount_point, '-xf', filename]) + self.ex.runv(['tar', '-C', mount_point, '-xhf', filename]) ldconfig(self.ex, mount_point) def _create_fstab(self, mount_point): -- cgit v1.2.1