mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Ladislav Michl <oss-lists@triops.cz>
Subject: Re: [ptxdist] [APPLIED] ptxd_make_world_common: optionally bailout on deprecated variable use
Date: Fri, 28 Oct 2022 16:44:15 +0200	[thread overview]
Message-ID: <20221028144415.2253616-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <Y06myyuO4QTDUgwn@lenoch>

Thanks, applied as 1405db882535f78318d8d62573b952cae3fa371d.

Michael

[sent from post-receive hook]

On Fri, 28 Oct 2022 16:44:14 +0200, Ladislav Michl <oss-lists@triops.cz> wrote:
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> Message-Id: <Y06myyuO4QTDUgwn@lenoch>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/config/setup/Kconfig b/config/setup/Kconfig
> index 0a7db1678a4b..f1a31e792bf5 100644
> --- a/config/setup/Kconfig
> +++ b/config/setup/Kconfig
> @@ -304,6 +304,12 @@ config SETUP_CHECK_EXIT_ON_ERROR
>  	  quite aggressive error checking. Don't turn this on until
>  	  you know what you're doing.
>  
> +config SETUP_DEPRECATED_FATAL
> +	bool "bailout on deprecated variable use"
> +	help
> +	  Terminate on deprecated variable use. Turn this on only
> +          if you are going to hunt for deprecated variables.
> +
>  config SETUP_ICECC
>  	bool "use icecc"
>  	depends on !SETUP_CCACHE
> diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
> index db24af99f729..f722210763a9 100644
> --- a/scripts/lib/ptxd_make_world_common.sh
> +++ b/scripts/lib/ptxd_make_world_common.sh
> @@ -20,6 +20,15 @@ ptxd_make_world_init_deprecation_check() {
>  	pkg_deprecated_compile_env
>  	pkg_deprecated_makevars
>  	)
> +    local -a depname
> +    depname=(
> +	BUILDDIR
> +	ENV
> +	AUTOCONF
> +	CMAKE
> +	COMPILE_ENV
> +	MAKEVARS
> +	)
>      local i
>  
>      for ((i = 0; i < ${#dep[@]}; i++)); do
> @@ -28,8 +37,12 @@ ptxd_make_world_init_deprecation_check() {
>  
>  	[ -z "${val}" ] && continue
>  
> -	echo "${var}=\"${val}\""
> +	echo "<PKG>_${depname[i]}: ${var}=\"${val}\""
>  	echo
> +
> +	if [ "${PTXCONF_SETUP_DEPRECATED_FATAL}" = "y" ]; then
> +	    ptxd_bailout "${FUNCNAME}: deprecated variable <PKG>_${depname[i]} detected!"
> +	fi
>      done
>  
>  }



      reply	other threads:[~2022-10-28 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 13:14 [ptxdist] [RFC] " Ladislav Michl
2022-10-28 14:44 ` Michael Olbrich [this message]

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=20221028144415.2253616-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=oss-lists@triops.cz \
    --cc=ptxdist@pengutronix.de \
    /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