Skip to content

Image Customizer: Make either one of split partitions format and output image format required#7323

Merged
amritakohli merged 3 commits intomicrosoft:mainfrom
amritakohli:amritakohli-micFlags
Jan 18, 2024
Merged

Image Customizer: Make either one of split partitions format and output image format required#7323
amritakohli merged 3 commits intomicrosoft:mainfrom
amritakohli:amritakohli-micFlags

Conversation

@amritakohli
Copy link
Copy Markdown
Contributor

@amritakohli amritakohli commented Jan 18, 2024

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

We want to allow user to extract just the partition files and not the image file itself. We also want the user to be able to extract the image and not partition files.
This change makes either one of the two flags, --output-split-partitions-format and --output-image-format, required to allow for this.
Previously, output image format was a required argument.

Change Log
  • Add conditionals to make either one of the flags required.
  • Documentation updated.
Does this affect the toolchain?

NO

Test Methodology
  • Tested all cases locally: Neither flag mentioned. Output image format specified only. Output split partitions format specified only. Both specified.
    Error example:
    sudo go run ./imagecustomizer --build-dir ./build --image-file ~/core-2.0.20231115.vhdx --output-image-file ./out/image5.raw --config-file ~/config-3.yaml
    imagecustomizer: error: Either --output-image-format or --output-split-partitions-format must be specified.
    exit status 1

@amritakohli amritakohli changed the base branch from 2.0 to main January 18, 2024 18:06
@microsoft-github-policy-service microsoft-github-policy-service Bot added the main PR Destined for main label Jan 18, 2024
@amritakohli amritakohli changed the title DRAFT mic flags Image Customizer: Make either one of split partitions format and output image format required Jan 18, 2024
@amritakohli amritakohli marked this pull request as ready for review January 18, 2024 18:25
@amritakohli amritakohli requested a review from a team as a code owner January 18, 2024 18:25
@amritakohli amritakohli merged commit 770c563 into microsoft:main Jan 18, 2024
cwize1 pushed a commit that referenced this pull request Jan 18, 2024
cwize1 pushed a commit that referenced this pull request Jan 18, 2024
BettyRain pushed a commit that referenced this pull request Jan 23, 2024
BettyRain pushed a commit that referenced this pull request Jan 26, 2024
sharath-srikanth-chellappa pushed a commit that referenced this pull request Jan 26, 2024
sharath-srikanth-chellappa pushed a commit that referenced this pull request Jan 26, 2024
sharath-srikanth-chellappa pushed a commit that referenced this pull request Jan 26, 2024
BettyRain pushed a commit that referenced this pull request Jan 27, 2024
Adub17030MS pushed a commit that referenced this pull request Feb 9, 2024
Xiaohong-Deng pushed a commit to Xiaohong-Deng/azurelinux that referenced this pull request Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants