~linaro-image-tools/linaro-image-tools/trunk

« back to all changes in this revision

Viewing changes to linaro_image_tools/media_create/chroot_utils.py

Install hwpack with --force-yes if hwpack integrity has been verified.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
                  os.path.join(chroot_dir, 'usr', 'bin'))
44
44
 
45
45
def install_hwpacks(
46
 
    chroot_dir, tmp_dir, tools_dir, hwpack_force_yes, *hwpack_files):
 
46
    chroot_dir, tmp_dir, tools_dir, hwpack_force_yes, verified_files, *hwpack_files):
47
47
    """Install the given hwpacks onto the given chroot."""
48
48
    prepare_chroot(chroot_dir, tmp_dir)
49
49
 
58
58
    try:
59
59
        mount_chroot_proc(chroot_dir)
60
60
        for hwpack_file in hwpack_files:
61
 
            install_hwpack(chroot_dir, hwpack_file, hwpack_force_yes)
 
61
            hwpack_verified = False
 
62
            if os.path.basename(hwpack_file) in verified_files:
 
63
                hwpack_verified = True
 
64
            install_hwpack(chroot_dir, hwpack_file, hwpack_force_yes or hwpack_verified)
62
65
    finally:
63
66
        run_local_atexit_funcs()
64
67