diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 443: Make the boot_script hwpack field optional.

Message ID 20111006091714.29115.67334.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Mattias Backman Oct. 6, 2011, 9:17 a.m. UTC
Merge authors:
  Mattias Backman (mabac)
Related merge proposals:
  https://code.launchpad.net/~mabac/linaro-image-tools/bug-860225/+merge/77104
  proposed by: Mattias Backman (mabac)
  review: Approve - James Westby (james-w)
------------------------------------------------------------
revno: 443 [merge]
committer: Mattias Backman <mattias.backman@linaro.org>
branch nick: linaro-image-tools
timestamp: Thu 2011-10-06 11:15:07 +0200
message:
  Make the boot_script hwpack field optional.
modified:
  linaro_image_tools/hwpack/config.py
  linaro_image_tools/hwpack/tests/test_config.py
  linaro_image_tools/media_create/boards.py


--
lp:linaro-image-tools
https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk

You are subscribed to branch lp:linaro-image-tools.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'linaro_image_tools/hwpack/config.py'
--- linaro_image_tools/hwpack/config.py	2011-09-22 12:23:46 +0000
+++ linaro_image_tools/hwpack/config.py	2011-09-27 07:06:09 +0000
@@ -602,9 +602,7 @@ 
     def _validate_boot_script(self):
         boot_script = self.boot_script
         if not boot_script:
-            raise HwpackConfigError(
-                "No boot_script in the [%s] section" % \
-                    self.MAIN_SECTION)
+            return
         else:
             self._assert_matches_pattern(
                 self.PATH_REGEX, boot_script, "Invalid path: %s" % boot_script)

=== modified file 'linaro_image_tools/hwpack/tests/test_config.py'
--- linaro_image_tools/hwpack/tests/test_config.py	2011-09-21 13:13:59 +0000
+++ linaro_image_tools/hwpack/tests/test_config.py	2011-09-27 07:06:09 +0000
@@ -242,16 +242,6 @@ 
                                      "initrd_file = \n")
         self.assertValidationError("No initrd_file in the [hwpack] section", config)
 
-    def test_validate_empty_boot_script(self):
-        config = self.get_config(self.valid_start_v2 + 
-                                 "u-boot-package = u-boot-linaro-s5pv310\n" \
-                                     "u-boot-file = u-boot.bin\n"
-                                     "partition_layout = bootfs_rootfs\n"\
-                                     "kernel_file = boot/vmlinuz-3.0.0-1002-linaro-omap\n"\
-                                     "mmc_id = 0:1\n"\
-                                     "initrd_file = boot/initrd.img-3.0.0-1002-linaro-omap\n")
-        self.assertValidationError("No boot_script in the [hwpack] section", config)
-
     def test_validate_invalid_boot_script(self):
         config = self.get_config(self.valid_start_v2 + 
                                  "u-boot-package = u-boot-linaro-s5pv310\n" \

=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py	2011-10-04 15:21:57 +0000
+++ linaro_image_tools/media_create/boards.py	2011-10-06 09:15:07 +0000
@@ -684,8 +684,8 @@ 
             boot_script_path = os.path.join(boot_dir, cls.boot_script)
             make_boot_script(boot_env, boot_script_path)
 
-        # Only used for Omap and Igep, will this be bad for the other boards?
-        make_boot_ini(boot_script_path, boot_dir)
+            # Only used for Omap, will this be bad for the other boards?
+            make_boot_ini(boot_script_path, boot_dir)
 
         if (cls.snowball_startup_files_config is not None and
             cls.board != 'snowball_sd'):