sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Fix the Bug of SONiC Extension Packages Migration

Open PeterTSW-EC opened this issue 1 year ago • 1 comments

What I did

  • SONiC updates the format of the CLI section in the manifest.json on 17/5/2023. (Link)
  • The implementation was merged to master, 202311, or later branches. (Link)
  • However, the PR #2753 Comment reported that an error occurred when the CLI migration.
  • The root cause is occurred while a CLI field (show/config/clear) is empty ('').
  • This PR corrects the manifest.json parser that leaves the empty list ([]) instead of a list with an empty string (['']) when the CLI field is empty ('').

How I did it

  • Update the manifest.py, and add a condition that returns an empty list ([]) when the CLI field is an empty string (''); Otherwise, return a list with a single string path (['/xxx/xxx']).

How to verify it

Execute the command "sudo sonic-package-manager install -y --from-tarball ./docker-test.gz", or install a new version of the SONiC image. (It executes the "sonic-package-manager migrate" during the installation. )

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

PeterTSW-EC avatar Jul 16 '24 03:07 PeterTSW-EC

The PR #2753's comment was mentioned about the same issue. This PR fixes the Issue #3425.

PeterTSW-EC avatar Jul 16 '24 03:07 PeterTSW-EC