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
1=== modified file 'linaro_image_tools/media_create/android_boards.py'
2--- linaro_image_tools/media_create/android_boards.py 2013-11-28 09:30:19 +0000
3+++ linaro_image_tools/media_create/android_boards.py 2013-12-10 11:13:18 +0000
4@@ -183,7 +183,7 @@
5 return (
6 "%(serial_options)s "
7 "%(boot_args_options)s"
8- % replacements)
9+ % replacements).strip()
10
11 def _get_boot_env(self, consoles):
12 """Get the boot environment for this board.
13@@ -212,11 +212,12 @@
14
15 boot_env = self._get_boot_env(consoles)
16 cmdline_filepath = os.path.join(boot_disk, "cmdline")
17- cmdline_file = open(cmdline_filepath, 'r')
18- android_kernel_cmdline = cmdline_file.read()
19+
20+ with open(cmdline_filepath, 'r') as cmdline_file:
21+ android_kernel_cmdline = cmdline_file.read().strip()
22+
23 boot_env['bootargs'] = boot_env['bootargs'] + ' ' + \
24 android_kernel_cmdline
25- cmdline_file.close()
26
27 boot_dir = boot_disk
28 boot_script_path = os.path.join(boot_dir, self.boot_script)
29
30=== modified file 'linaro_image_tools/media_create/boards.py'
31--- linaro_image_tools/media_create/boards.py 2013-09-23 09:55:03 +0000
32+++ linaro_image_tools/media_create/boards.py 2013-12-10 11:13:18 +0000
33@@ -577,14 +577,14 @@
34 boot_args_options = 'rootwait ro'
35 serial_options = ''
36 if self.extra_boot_args_options:
37- boot_args_options += ' %s' % self.extra_boot_args_options
38+ boot_args_options += ' %s' % self.extra_boot_args_options.strip()
39 if self.extra_serial_options:
40- serial_options = self.extra_serial_options
41+ serial_options = self.extra_serial_options.strip()
42 for console in consoles:
43- serial_options += ' console=%s' % console
44+ serial_options += ' console=%s' % console.strip()
45
46 lowmem_opt = ''
47- boot_snippet = 'root=%s' % rootfs_id
48+ boot_snippet = 'root=%s' % rootfs_id.strip()
49 if is_live:
50 serial_options += ' %s' % self.live_serial_options
51 boot_snippet = 'boot=casper'
52@@ -1937,7 +1937,7 @@
53 'setenv fdt_high "%(fdt_high)s"\n'
54 'setenv bootcmd "%(bootcmd)s"\n'
55 'setenv bootargs "%(bootargs)s"\n'
56- "boot"
57+ 'boot'
58 % boot_env)
59
60

Subscribers

People subscribed via source and target branches