[PATCH 2/9] cmd: Kconfig: Add missing dependency for cmd gpt

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Aug 19 11:01:37 CEST 2020


On 19.08.20 10:51, Michal Simek wrote:
>
>
> On 19. 08. 20 10:46, Heinrich Schuchardt wrote:
>> On 19.08.20 10:44, Michal Simek wrote:
>>> Command gpt select PARTITION_UUIDS which depends on PARTITIONS which is
>>> doesn't need to be enabled.
>>>
>>> Kconfig reports it like this.
>>>
>>> WARNING: unmet direct dependencies detected for PARTITION_UUIDS
>>>   Depends on [n]: PARTITIONS [=n]
>>>   Selected by [y]:
>>>   - CMD_GPT [=y]
>>>
>>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>>> ---
>>>
>>>  cmd/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/cmd/Kconfig b/cmd/Kconfig
>>> index 9ad511aa176f..692fae5b8e89 100644
>>> --- a/cmd/Kconfig
>>> +++ b/cmd/Kconfig
>>> @@ -1012,6 +1012,7 @@ config CMD_GPT
>>>  	bool "GPT (GUID Partition Table) command"
>>>  	select EFI_PARTITION
>>>  	select HAVE_BLOCK_DEVICE
>>> +	select PARTITIONS
>>>  	select PARTITION_UUIDS
>>
>> It would be preferable to use "depends" instead of "select".
>>
>> You don't want anybody to select this command on a device that does not
>> even have block devices.
>
> Do we have any doc which is talking about preferred ways?
>
> If you look at all patches I have used mostly depends on instead of
> select with 2 exception. This patch and then last one 9/9.
>
> In this case I use select because as you use there is already a lot of
> other selection for EFI, BLOCK_DEVICE and UUIDS.

Select allows you to set something whose own dependencies are not
fulfilled. So depends is preferable.

Best regards

Heinrich


More information about the U-Boot mailing list