-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Chore] tools.images_packer: refine previous offline_ota_image_builder to support 2 image packing mode #267
Changes from 1 commit
e3e573f
02c4399
5592763
ffecddd
a964442
d0555d8
7e2c77b
6141adb
6214184
b3f0f3e
d5416d0
a9edc6b
9abd24f
707857c
ced541c
786ef4d
a13f3bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -69,6 +69,13 @@ def main_build_offline_ota_image_bundle(args: argparse.Namespace): | |||||||||||||||||
image_version=_image_version, | ||||||||||||||||||
) | ||||||||||||||||||
) | ||||||||||||||||||
if _ecu_id in image_files: | ||||||||||||||||||
logger.warning( | ||||||||||||||||||
( | ||||||||||||||||||
f"override previously set OTA target image for ECU@{_ecu_id} " | ||||||||||||||||||
f"from {image_files[_ecu_id]} to {_image_fpath}" | ||||||||||||||||||
) | ||||||||||||||||||
) | ||||||||||||||||||
image_files[_ecu_id] = _image_fpath | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. _ecu_id key must be checked if the key already exists. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated at a9edc6b. If same ECU has multiple target OTA image being specified, a warning log will be issued, and later setting will override the previous one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ota-client/tools/images_packer/__main__.py Lines 72 to 79 in a9edc6b
|
||||||||||||||||||
else: | ||||||||||||||||||
logger.warning(f"ignore illegal image pair: {raw_pair}") | ||||||||||||||||||
|
@@ -233,7 +240,9 @@ def command_build_offline_ota_image_bundle( | |||||||||||||||||
"--image", | ||||||||||||||||||
help=( | ||||||||||||||||||
"OTA image for <ECU_ID> as tar archive(compressed or uncompressed), " | ||||||||||||||||||
"this option can be used multiple times to include multiple images." | ||||||||||||||||||
"this option can be used multiple times to include multiple images. \n" | ||||||||||||||||||
"NOTE: if multiple OTA target image is specified for the same ECU, the later one " | ||||||||||||||||||
"will override the previous set one." | ||||||||||||||||||
), | ||||||||||||||||||
required=True, | ||||||||||||||||||
metavar="<ECU_NAME>:<IMAGE_PATH>[:<IMAGE_VERSION>]", | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should not be warning. For the user, this is the unexpected behavior, so it should be error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I agree! This is unexpected behavior. Let me fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at 786ef4d, now multiple images specified to the same ECU will cause the images_packer logging an error and then exit.