Merge lp:~milo/linaro-image-tools/bug1231266 into lp:linaro-image-tools/11.11

Proposed by Milo Casagrande
Status: Rejected
Rejected by: Milo Casagrande
Proposed branch: lp:~milo/linaro-image-tools/bug1231266
Merge into: lp:linaro-image-tools/11.11
Diff against target: 58 lines (+10/-9)
2 files modified
linaro_image_tools/media_create/android_boards.py (+5/-4)
linaro_image_tools/media_create/boards.py (+5/-5)
To merge this branch: bzr merge lp:~milo/linaro-image-tools/bug1231266
Reviewer Review Type Date Requested Status
linaro-image-tools maintainers Pending
Review via email: mp+198369@code.launchpad.net

Description of the change

Cleanup of some empty spaces that were creating broken boot command lines.

To post a comment you must log in.

Unmerged revisions

646. By Milo Casagrande

Removed empty spaces or new lines at string end.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'linaro_image_tools/media_create/android_boards.py'
--- linaro_image_tools/media_create/android_boards.py 2013-11-28 09:30:19 +0000
+++ linaro_image_tools/media_create/android_boards.py 2013-12-10 11:13:18 +0000
@@ -183,7 +183,7 @@
183 return (183 return (
184 "%(serial_options)s "184 "%(serial_options)s "
185 "%(boot_args_options)s"185 "%(boot_args_options)s"
186 % replacements)186 % replacements).strip()
187187
188 def _get_boot_env(self, consoles):188 def _get_boot_env(self, consoles):
189 """Get the boot environment for this board.189 """Get the boot environment for this board.
@@ -212,11 +212,12 @@
212212
213 boot_env = self._get_boot_env(consoles)213 boot_env = self._get_boot_env(consoles)
214 cmdline_filepath = os.path.join(boot_disk, "cmdline")214 cmdline_filepath = os.path.join(boot_disk, "cmdline")
215 cmdline_file = open(cmdline_filepath, 'r')215
216 android_kernel_cmdline = cmdline_file.read()216 with open(cmdline_filepath, 'r') as cmdline_file:
217 android_kernel_cmdline = cmdline_file.read().strip()
218
217 boot_env['bootargs'] = boot_env['bootargs'] + ' ' + \219 boot_env['bootargs'] = boot_env['bootargs'] + ' ' + \
218 android_kernel_cmdline220 android_kernel_cmdline
219 cmdline_file.close()
220221
221 boot_dir = boot_disk222 boot_dir = boot_disk
222 boot_script_path = os.path.join(boot_dir, self.boot_script)223 boot_script_path = os.path.join(boot_dir, self.boot_script)
223224
=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py 2013-09-23 09:55:03 +0000
+++ linaro_image_tools/media_create/boards.py 2013-12-10 11:13:18 +0000
@@ -577,14 +577,14 @@
577 boot_args_options = 'rootwait ro'577 boot_args_options = 'rootwait ro'
578 serial_options = ''578 serial_options = ''
579 if self.extra_boot_args_options:579 if self.extra_boot_args_options:
580 boot_args_options += ' %s' % self.extra_boot_args_options580 boot_args_options += ' %s' % self.extra_boot_args_options.strip()
581 if self.extra_serial_options:581 if self.extra_serial_options:
582 serial_options = self.extra_serial_options582 serial_options = self.extra_serial_options.strip()
583 for console in consoles:583 for console in consoles:
584 serial_options += ' console=%s' % console584 serial_options += ' console=%s' % console.strip()
585585
586 lowmem_opt = ''586 lowmem_opt = ''
587 boot_snippet = 'root=%s' % rootfs_id587 boot_snippet = 'root=%s' % rootfs_id.strip()
588 if is_live:588 if is_live:
589 serial_options += ' %s' % self.live_serial_options589 serial_options += ' %s' % self.live_serial_options
590 boot_snippet = 'boot=casper'590 boot_snippet = 'boot=casper'
@@ -1937,7 +1937,7 @@
1937 'setenv fdt_high "%(fdt_high)s"\n'1937 'setenv fdt_high "%(fdt_high)s"\n'
1938 'setenv bootcmd "%(bootcmd)s"\n'1938 'setenv bootcmd "%(bootcmd)s"\n'
1939 'setenv bootargs "%(bootargs)s"\n'1939 'setenv bootargs "%(bootargs)s"\n'
1940 "boot"1940 'boot'
1941 % boot_env)1941 % boot_env)
19421942
19431943

Subscribers

People subscribed via source and target branches