diff options
Diffstat (limited to 'scripts/lib/image/engine.py')
| -rw-r--r-- | scripts/lib/image/engine.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 0e8b89e5f1..2dd98b968c 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py | |||
| @@ -60,16 +60,26 @@ def verify_build_env(): | |||
| 60 | return True | 60 | return True |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | def find_artifacts(image_name): | 63 | def find_bitbake_env_lines(image_name): |
| 64 | """ | 64 | """ |
| 65 | Gather the build artifacts for the current image (the image_name | 65 | If image_name is empty, plugins might still be able to use the |
| 66 | e.g. core-image-minimal) for the current MACHINE set in local.conf | 66 | environment, so set it regardless. |
| 67 | """ | 67 | """ |
| 68 | bitbake_env_cmd = "bitbake -e %s" % image_name | 68 | bitbake_env_cmd = "bitbake -e %s" % image_name |
| 69 | rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd) | 69 | rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd) |
| 70 | if rc != 0: | 70 | if rc != 0: |
| 71 | print "Couldn't get '%s' output, exiting." % bitbake_env_cmd | 71 | print "Couldn't get '%s' output." % bitbake_env_cmd |
| 72 | sys.exit(1) | 72 | return None |
| 73 | |||
| 74 | return bitbake_env_lines | ||
| 75 | |||
| 76 | |||
| 77 | def find_artifacts(image_name): | ||
| 78 | """ | ||
| 79 | Gather the build artifacts for the current image (the image_name | ||
| 80 | e.g. core-image-minimal) for the current MACHINE set in local.conf | ||
| 81 | """ | ||
| 82 | bitbake_env_lines = get_bitbake_env_lines() | ||
| 73 | 83 | ||
| 74 | rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = "" | 84 | rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = "" |
| 75 | 85 | ||
