Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 6/8] ti-sgx-km: rename options to have proper prefix
Date: Sun, 13 May 2018 21:31:40 +0200	[thread overview]
Message-ID: <20180513193140.GJ22130@scaer> (raw)
In-Reply-To: <20180513190737.26079-7-thomas.petazzoni@bootlin.com>

Thomas, All,

On 2018-05-13 21:07 +0200, Thomas Petazzoni spake thusly:
> The sub-options of the ti-sgx-km package had their name option
> prefixed by BR2_PACKAGE_TI_SGX, while the prefix should be
> BR2_PACKAGE_TI_SGX_KM. This commit fixes that, and adds the necessary
> Config.in.legacy handling.
> 
> Since those options are part of a choice, the legacy handling cannot
> select the new name of the options, so the legacy handling only
> informs the user of the rename.

As I was explaining on IRC, we /could/ have legacy handling for choices.
This would be done in three parts;

  - the new options replace the old ones in the choice, as we currently
    do (and as is done in this patch);

  - this choice is given a "name" (see below), so we can redefine it
    elsewhere;

  - in the legacy menu, we duplicate the choice with the same "name"
    and the same options, but with a set of "default-if" options.


For example:

    # In bar/Config.in:
    choice BAR
        bool "bar choice"
    config BAR_1
        bool "bar 1"
    config BAR_2
        bool "bar 2"
    endchoice

    # In Config.in.legacy:
    choice BAR
        bool "bar choice"
        default BAR_1 if FOO_1
        default BAR_2 if FOO_2
    config BAR_1
        bool "bar 1"
    config BAR_2
        bool "bar 2"
    endchoice

    config FOO_1
        bool "foo 1 was renamed"
    config FOO_2
        bool "foo 2 was renamed"

(not tested, but it should work).

What is nice with this solution, is that we have the new choice that is
right near the legacy option so we can chek it, and it automatically
gets the old setting.

But I am not too convinced, however, because we do not usually use the
name of a choice elsewhere...

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  Config.in.legacy               | 32 ++++++++++++++++++++++++++++++++
>  package/ti-sgx-km/Config.in    | 10 +++++-----
>  package/ti-sgx-km/ti-sgx-km.mk |  8 ++++----
>  3 files changed, 41 insertions(+), 9 deletions(-)
> 
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 981306f469..5cf25463ad 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -145,6 +145,38 @@ endif
>  ###############################################################################
>  comment "Legacy options removed in 2018.05"
>  
> +config BR2_PACKAGE_TI_SGX_AM335X
> +	bool "ti-sgx-km AM335X option renamed"
> +	select BR2_LEGACY
> +	help
> +	  For consistency reasons, the option
> +	  BR2_PACKAGE_TI_SGX_AM335X has been renamed to
> +	  BR2_PACKAGE_TI_SGX_KM_AM335X.
> +
> +config BR2_PACKAGE_TI_SGX_AM437X
> +	bool "ti-sgx-km AM437X option renamed"
> +	select BR2_LEGACY
> +	help
> +	  For consistency reasons, the option
> +	  BR2_PACKAGE_TI_SGX_AM437X has been renamed to
> +	  BR2_PACKAGE_TI_SGX_KM_AM437X.
> +
> +config BR2_PACKAGE_TI_SGX_AM4430
> +	bool "ti-sgx-km AM4430 option renamed"
> +	select BR2_LEGACY
> +	help
> +	  For consistency reasons, the option
> +	  BR2_PACKAGE_TI_SGX_AM4430 has been renamed to
> +	  BR2_PACKAGE_TI_SGX_KM_AM4430.
> +
> +config BR2_PACKAGE_TI_SGX_AM5430
> +	bool "ti-sgx-km AM5430 option renamed"
> +	select BR2_LEGACY
> +	help
> +	  For consistency reasons, the option
> +	  BR2_PACKAGE_TI_SGX_AM5430 has been renamed to
> +	  BR2_PACKAGE_TI_SGX_KM_AM5430.
> +
>  config BR2_PACKAGE_JANUS_AUDIO_BRIDGE
>  	bool "janus-gateway audio-bridge option renamed"
>  	select BR2_LEGACY
> diff --git a/package/ti-sgx-km/Config.in b/package/ti-sgx-km/Config.in
> index a4c9bb8ca2..db3d3f9ddd 100644
> --- a/package/ti-sgx-km/Config.in
> +++ b/package/ti-sgx-km/Config.in
> @@ -20,26 +20,26 @@ if BR2_PACKAGE_TI_SGX_KM
>  
>  choice
>  	prompt "Target"
> -	default BR2_PACKAGE_TI_SGX_AM335X
> +	default BR2_PACKAGE_TI_SGX_KM_AM335X
>  	help
>  	  Select the SOC for which you would like to install drivers.
>  
> -config BR2_PACKAGE_TI_SGX_AM335X
> +config BR2_PACKAGE_TI_SGX_KM_AM335X
>  	bool "AM335x"
>  	help
>  	  AM335x CPU
>  
> -config BR2_PACKAGE_TI_SGX_AM437X
> +config BR2_PACKAGE_TI_SGX_KM_AM437X
>  	bool "AM437x"
>  	help
>  	  AM437x CPU
>  
> -config BR2_PACKAGE_TI_SGX_AM4430
> +config BR2_PACKAGE_TI_SGX_KM_AM4430
>  	bool "AM4430"
>  	help
>  	  AM4430 CPU
>  
> -config BR2_PACKAGE_TI_SGX_AM5430
> +config BR2_PACKAGE_TI_SGX_KM_AM5430
>  	bool "AM5430"
>  	help
>  	  AM5430 CPU
> diff --git a/package/ti-sgx-km/ti-sgx-km.mk b/package/ti-sgx-km/ti-sgx-km.mk
> index db74da9b4a..0e1bc33902 100644
> --- a/package/ti-sgx-km/ti-sgx-km.mk
> +++ b/package/ti-sgx-km/ti-sgx-km.mk
> @@ -17,13 +17,13 @@ TI_SGX_KM_MAKE_OPTS = \
>  	KERNELDIR=$(LINUX_DIR) \
>  	PVR_NULLDRM=1
>  
> -ifeq ($(BR2_PACKAGE_TI_SGX_AM335X),y)
> +ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM335X),y)
>  TI_SGX_KM_PLATFORM_NAME = omap335x
> -else ifeq ($(BR2_PACKAGE_TI_SGX_AM437X),y)
> +else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM437X),y)
>  TI_SGX_KM_PLATFORM_NAME = omap437x
> -else ifeq ($(BR2_PACKAGE_TI_SGX_AM4430),y)
> +else ifeq ($(BR2_PACKAGE_TI_SGX_KM_AM4430),y)
>  TI_SGX_KM_PLATFORM_NAME = omap4430
> -else ifeq ($(BR2_PACKAGE_TI_SGX_5430),y)
> +else ifeq ($(BR2_PACKAGE_TI_SGX_KM_5430),y)
>  TI_SGX_KM_PLATFORM_NAME = omap5430
>  endif
>  
> -- 
> 2.14.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2018-05-13 19:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-13 19:07 [Buildroot] [PATCH 0/8] Fix the Config.in prefix of a number of options Thomas Petazzoni
2018-05-13 19:07 ` [Buildroot] [PATCH 1/8] bluez5_utils: rename options to have the proper suffix Thomas Petazzoni
2018-05-13 19:18   ` Yann E. MORIN
2018-05-13 19:07 ` [Buildroot] [PATCH 2/8] jquery-ui-themes: rename options to have proper prefix Thomas Petazzoni
2018-05-13 19:19   ` Yann E. MORIN
2018-05-13 19:07 ` [Buildroot] [PATCH 3/8] libftdi: rename option " Thomas Petazzoni
2018-05-13 19:19   ` Yann E. MORIN
2018-05-13 19:07 ` [Buildroot] [PATCH 4/8] ipsec-tools: rename options " Thomas Petazzoni
2018-05-13 19:21   ` Yann E. MORIN
2018-05-13 19:07 ` [Buildroot] [PATCH 5/8] janus-gateway: " Thomas Petazzoni
2018-05-13 19:22   ` Yann E. MORIN
2018-05-14  4:00   ` Ricardo Martincoski
2018-05-13 19:07 ` [Buildroot] [PATCH 6/8] ti-sgx-km: " Thomas Petazzoni
2018-05-13 19:31   ` Yann E. MORIN [this message]
2018-05-15 21:52     ` Arnout Vandecappelle
2018-05-16  7:00       ` Thomas Petazzoni
2018-05-16 15:16         ` Arnout Vandecappelle
2018-05-21 21:16           ` Peter Korsgaard
2018-05-22 10:42             ` Arnout Vandecappelle
2018-05-28 20:45               ` Yann E. MORIN
2018-05-29 10:45                 ` Arnout Vandecappelle
2018-05-29 17:26                   ` Yann E. MORIN
2018-05-13 19:07 ` [Buildroot] [PATCH 7/8] libmediaart: " Thomas Petazzoni
2018-05-13 19:32   ` Yann E. MORIN
2018-05-13 19:07 ` [Buildroot] [PATCH 8/8] utils/check-package: verify the prefix of package Config.in options Thomas Petazzoni
2018-05-14  4:04   ` Ricardo Martincoski
2018-05-21 21:18 ` [Buildroot] [PATCH 0/8] Fix the Config.in prefix of a number of options Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180513193140.GJ22130@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox