diff options
author | James Tunnicliffe <james.tunnicliffe@linaro.org> | 2012-07-23 15:10:35 +0100 |
---|---|---|
committer | James Tunnicliffe <james.tunnicliffe@linaro.org> | 2012-07-23 15:10:35 +0100 |
commit | 1693cc57d8f182e952b5c00a41446c53764c5e14 (patch) | |
tree | 20107666b8d2e5f7af3419667f92fbdac114318f /linaro_image_tools/media_create/chroot_utils.py | |
parent | 50cea53324a677720294c3635661837db2559a8c (diff) |
Move parsing of infrormation in hardware pack metadata out of linaro-hwpack-install.
Diffstat (limited to 'linaro_image_tools/media_create/chroot_utils.py')
-rw-r--r-- | linaro_image_tools/media_create/chroot_utils.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/linaro_image_tools/media_create/chroot_utils.py b/linaro_image_tools/media_create/chroot_utils.py index b3fb441..9295b0e 100644 --- a/linaro_image_tools/media_create/chroot_utils.py +++ b/linaro_image_tools/media_create/chroot_utils.py @@ -25,7 +25,7 @@ from linaro_image_tools.utils import ( is_arm_host, find_command, ) - +from linaro_image_tools.media_create.boards import HardwarepackHandler # It'd be nice if we could use atexit here, but all the things we need to undo # have to happen right after install_hwpacks completes and the atexit @@ -97,7 +97,17 @@ def install_hwpack(chroot_dir, hwpack_file, hwpack_force_yes): print "-" * 60 print "Installing (linaro-hwpack-install) %s in target rootfs." % ( hwpack_basename) - args = ['linaro-hwpack-install'] + + # Get infromation required by linaro-hwpack-install + with HardwarepackHandler([hwpack_file]) as hwpack: + version, _ = hwpack.get_field("version") + architecture, _ = hwpack.get_field("architecture") + name, _ = hwpack.get_field("name") + + args = ['linaro-hwpack-install', + '--hwpack-version', version, + '--hwpack-arch', architecture, + '--hwpack-name', name] if hwpack_force_yes: args.append('--force-yes') args.append('/%s' % hwpack_basename) |