diff options
Diffstat (limited to 'scripts/lib/wic/engine.py')
| -rw-r--r-- | scripts/lib/wic/engine.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 76b93e82f2..5d35c46b32 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py | |||
| @@ -44,7 +44,7 @@ def verify_build_env(): | |||
| 44 | Returns True if it is, false otherwise | 44 | Returns True if it is, false otherwise |
| 45 | """ | 45 | """ |
| 46 | if not os.environ.get("BUILDDIR"): | 46 | if not os.environ.get("BUILDDIR"): |
| 47 | print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" | 47 | print("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)") |
| 48 | sys.exit(1) | 48 | sys.exit(1) |
| 49 | 49 | ||
| 50 | return True | 50 | return True |
| @@ -107,7 +107,7 @@ def list_canned_images(scripts_path): | |||
| 107 | desc = line[idx + len("short-description:"):].strip() | 107 | desc = line[idx + len("short-description:"):].strip() |
| 108 | break | 108 | break |
| 109 | basename = os.path.splitext(fname)[0] | 109 | basename = os.path.splitext(fname)[0] |
| 110 | print " %s\t\t%s" % (basename.ljust(30), desc) | 110 | print(" %s\t\t%s" % (basename.ljust(30), desc)) |
| 111 | 111 | ||
| 112 | 112 | ||
| 113 | def list_canned_image_help(scripts_path, fullpath): | 113 | def list_canned_image_help(scripts_path, fullpath): |
| @@ -120,15 +120,15 @@ def list_canned_image_help(scripts_path, fullpath): | |||
| 120 | if not found: | 120 | if not found: |
| 121 | idx = line.find("long-description:") | 121 | idx = line.find("long-description:") |
| 122 | if idx != -1: | 122 | if idx != -1: |
| 123 | 123 | print() | |
| 124 | print line[idx + len("long-description:"):].strip() | 124 | print(line[idx + len("long-description:"):].strip()) |
| 125 | found = True | 125 | found = True |
| 126 | continue | 126 | continue |
| 127 | if not line.strip(): | 127 | if not line.strip(): |
| 128 | break | 128 | break |
| 129 | idx = line.find("#") | 129 | idx = line.find("#") |
| 130 | if idx != -1: | 130 | if idx != -1: |
| 131 | print line[idx + len("#:"):].rstrip() | 131 | print(line[idx + len("#:"):].rstrip()) |
| 132 | else: | 132 | else: |
| 133 | break | 133 | break |
| 134 | 134 | ||
| @@ -140,7 +140,7 @@ def list_source_plugins(): | |||
| 140 | plugins = pluginmgr.get_source_plugins() | 140 | plugins = pluginmgr.get_source_plugins() |
| 141 | 141 | ||
| 142 | for plugin in plugins: | 142 | for plugin in plugins: |
| 143 | print " %s" % plugin | 143 | print(" %s" % plugin) |
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir, | 146 | def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir, |
| @@ -178,7 +178,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir, | |||
| 178 | try: | 178 | try: |
| 179 | oe_builddir = os.environ["BUILDDIR"] | 179 | oe_builddir = os.environ["BUILDDIR"] |
| 180 | except KeyError: | 180 | except KeyError: |
| 181 | print "BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)" | 181 | print("BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)") |
| 182 | sys.exit(1) | 182 | sys.exit(1) |
| 183 | 183 | ||
| 184 | if debug: | 184 | if debug: |
| @@ -189,7 +189,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir, | |||
| 189 | crobj.main(["direct", native_sysroot, kernel_dir, bootimg_dir, rootfs_dir, | 189 | crobj.main(["direct", native_sysroot, kernel_dir, bootimg_dir, rootfs_dir, |
| 190 | wks_file, image_output_dir, oe_builddir, compressor or ""]) | 190 | wks_file, image_output_dir, oe_builddir, compressor or ""]) |
| 191 | 191 | ||
| 192 | print "\nThe image(s) were created using OE kickstart file:\n %s" % wks_file | 192 | print("\nThe image(s) were created using OE kickstart file:\n %s" % wks_file) |
| 193 | 193 | ||
| 194 | 194 | ||
| 195 | def wic_list(args, scripts_path): | 195 | def wic_list(args, scripts_path): |
| @@ -209,10 +209,10 @@ def wic_list(args, scripts_path): | |||
| 209 | wks_file = args[0] | 209 | wks_file = args[0] |
| 210 | fullpath = find_canned_image(scripts_path, wks_file) | 210 | fullpath = find_canned_image(scripts_path, wks_file) |
| 211 | if not fullpath: | 211 | if not fullpath: |
| 212 | print "No image named %s found, exiting. "\ | 212 | print("No image named %s found, exiting. "\ |
| 213 | "(Use 'wic list images' to list available images, or "\ | 213 | "(Use 'wic list images' to list available images, or "\ |
| 214 | "specify a fully-qualified OE kickstart (.wks) "\ | 214 | "specify a fully-qualified OE kickstart (.wks) "\ |
| 215 | "filename)\n" % wks_file | 215 | "filename)\n" % wks_file) |
| 216 | sys.exit(1) | 216 | sys.exit(1) |
| 217 | list_canned_image_help(scripts_path, fullpath) | 217 | list_canned_image_help(scripts_path, fullpath) |
| 218 | return True | 218 | return True |
