|
12 | 12 | from swsscommon.swsscommon import SonicV2Connector |
13 | 13 |
|
14 | 14 | from .bootloader import get_bootloader |
| 15 | +from .bootloader.aboot import AbootBootloader |
15 | 16 | from .common import ( |
16 | 17 | run_command, run_command_or_raise, |
17 | 18 | IMAGE_PREFIX, |
|
23 | 24 | from .exception import SonicRuntimeException |
24 | 25 |
|
25 | 26 | SYSLOG_IDENTIFIER = "sonic-installer" |
26 | | -LOG_ERR = logger.Logger.LOG_PRIORITY_ERROR |
| 27 | +LOG_ERR = logger.Logger.LOG_PRIORITY_ERROR |
27 | 28 | LOG_NOTICE = logger.Logger.LOG_PRIORITY_NOTICE |
28 | 29 |
|
29 | 30 | # Global Config object |
@@ -140,7 +141,7 @@ def echo_and_log(msg, priority=LOG_NOTICE, fg=None): |
140 | 141 | else: |
141 | 142 | click.secho(msg, fg=fg) |
142 | 143 | log.log(priority, msg, False) |
143 | | - |
| 144 | + |
144 | 145 |
|
145 | 146 | # Function which validates whether a given URL specifies an existent file |
146 | 147 | # on a reachable remote machine. Will abort the current operation if not |
@@ -323,7 +324,7 @@ def migrate_sonic_packages(bootloader, binary_image_version): |
323 | 324 |
|
324 | 325 | with contextlib.ExitStack() as stack: |
325 | 326 | def get_path(path): |
326 | | - """ Closure to get path by entering |
| 327 | + """ Closure to get path by entering |
327 | 328 | a context manager of bootloader.get_path_in_image """ |
328 | 329 |
|
329 | 330 | return stack.enter_context(bootloader.get_path_in_image(new_image_dir, path)) |
@@ -433,6 +434,10 @@ def install(url, force, skip_migration=False, skip_package_migration=False): |
433 | 434 |
|
434 | 435 | update_sonic_environment(bootloader, binary_image_version) |
435 | 436 |
|
| 437 | + if isinstance(bootloader, AbootBootloader) and not skip_package_migration: |
| 438 | + echo_and_log("Warning: SONiC package migration is not supported currenty on aboot platform due to https://github.com/Azure/sonic-buildimage/issues/7566.", LOG_ERR, fg="red") |
| 439 | + skip_package_migration = True |
| 440 | + |
436 | 441 | if not skip_package_migration: |
437 | 442 | migrate_sonic_packages(bootloader, binary_image_version) |
438 | 443 |
|
|
0 commit comments