Merge branch 'bugfix/parttool-extra-partition-subtypes-eat-all' into 'master'

fix(partition_table): restore multi-value --extra-partition-subtypes parsing

See merge request espressif/esp-idf!50287
This commit is contained in:
Igor Udot
2026-07-02 16:20:57 +08:00
2 changed files with 21 additions and 2 deletions
+11 -1
View File
@@ -20,6 +20,7 @@ import struct
import sys
import rich_click as click
from esp_pylib.cli_options import OptionEatAll
from esp_pylib.cli_types import AnyIntType
from esp_pylib.logger import log
@@ -793,7 +794,16 @@ def run_gen(
default=None,
help='Require app partitions to be suitable for secure boot',
)
@click.option('--extra-partition-subtypes', multiple=True, help='Extra partition subtype entries')
# Use OptionEatAll to keep argparse nargs='*' semantics: a single
# --extra-partition-subtypes flag consumes all following space-separated
# entries (CMake partition_table/CMakeLists.txt passes them this way).
@click.option(
'--extra-partition-subtypes',
multiple=True,
cls=OptionEatAll,
type=str,
help='Extra partition subtype entries',
)
@click.argument('input_file', type=click.File('rb'), metavar='INPUT')
@click.argument('output', type=click.Path(), required=False, default='-')
def cli(
+10 -1
View File
@@ -270,7 +270,16 @@ def _partition_selection_options(func):
help='select the default boot partition using the same fallback logic as the IDF bootloader',
),
click.option('--partition-subtype', '-s', help='subtype of the partition'),
click.option('--extra-partition-subtypes', multiple=True, help='Extra partition subtype entries'),
# Use OptionEatAll to keep argparse nargs='*' semantics: a single
# --extra-partition-subtypes flag consumes all following space-separated
# entries (CMake project_include.cmake passes them this way).
click.option(
'--extra-partition-subtypes',
multiple=True,
cls=OptionEatAll,
type=str,
help='Extra partition subtype entries',
),
]
for decorator in reversed(decorators):
func = decorator(func)