mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>
Subject: Re: [ptxdist] [APPLIED] ptxd_make_world_inject: Use <PKG>_DIR directly
Date: Sun, 12 May 2024 15:16:42 +0200	[thread overview]
Message-ID: <20240512131642.3703640-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20240506105051.323546-3-ada@thorsis.com>

Thanks, applied as 0eea7080662b36cd39f03a3b0785d0e4a1c346bc.

Michael

[sent from post-receive hook]

On Sun, 12 May 2024 15:16:41 +0200, Alexander Dahl <ada@thorsis.com> wrote:
> pkg_source was defined as "$($(1)_DIR)" which is the same as pkg_dir in
> ptxd_make_world_common.  We can use pkg_dir directly.  Add a safe-guard
> to bail out early if that var is empty.
> 
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> Acked-by: Michael Riesch <michael.riesch@wolfvision.net>
> Message-Id: <20240506105051.323546-3-ada@thorsis.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/post/ptxd_make_world_inject.make b/rules/post/ptxd_make_world_inject.make
> index b7d28e92f25b..3506ee1140e1 100644
> --- a/rules/post/ptxd_make_world_inject.make
> +++ b/rules/post/ptxd_make_world_inject.make
> @@ -9,8 +9,7 @@
>  world/inject/env = \
>  	$(call world/env, $(1)) \
>  	pkg_inject_path="$($(1)_INJECT_PATH)" \
> -	pkg_inject_files="$($(1)_INJECT_FILES)" \
> -	pkg_source="$($(1)_DIR)"
> +	pkg_inject_files="$($(1)_INJECT_FILES)"
>  
>  world/inject = \
>  	$(call world/inject/env,$(strip $(1))) \
> diff --git a/scripts/lib/ptxd_make_world_inject.sh b/scripts/lib/ptxd_make_world_inject.sh
> index 5c2d0dc5fb3e..b74e464c6895 100644
> --- a/scripts/lib/ptxd_make_world_inject.sh
> +++ b/scripts/lib/ptxd_make_world_inject.sh
> @@ -10,7 +10,7 @@ ptxd_make_inject() {
>      local source target
>  
>      source="$(echo ${inject_file} | cut -d ":" -f 1)"
> -    target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
> +    target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
>  
>      if [[ "${source}" =~ ^/.* ]]; then
>  	ptxd_bailout "'${source}' must not be an absolute path!" \
> @@ -32,6 +32,10 @@ export -f ptxd_make_inject
>  ptxd_make_world_inject() {
>      ptxd_make_world_init || return
>  
> +    if [ -z "${pkg_dir}" ]; then
> +	ptxd_bailout "<PKG>_DIR empty, no destination to inject to."
> +    fi
> +
>      for inject_file in ${pkg_inject_files}; do
>  	ptxd_make_inject || return
>      done



  reply	other threads:[~2024-05-12 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 10:50 [ptxdist] [PATCH v2 0/4] ptxd_make_world_inject: Spring cleanup and optional dest dir Alexander Dahl
2024-05-06 10:50 ` [ptxdist] [PATCH v2 1/4] ptxd_make_world_inject: Remove useless test Alexander Dahl
2024-05-12 13:16   ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-06 10:50 ` [ptxdist] [PATCH v2 2/4] ptxd_make_world_inject: Use <PKG>_DIR directly Alexander Dahl
2024-05-12 13:16   ` Michael Olbrich [this message]
2024-05-06 10:50 ` [ptxdist] [PATCH v2 3/4] ptxd_make_world_inject: Escape inject path and files Alexander Dahl
2024-05-12 13:16   ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-06 10:50 ` [ptxdist] [PATCH v2 4/4] ptxd_make_world_inject: Introduce new variable <PKG>_INJECT_OOT Alexander Dahl
2024-05-12 13:16   ` [ptxdist] [APPLIED] " Michael Olbrich
2024-05-06 14:11 ` [ptxdist] [PATCH v2 0/4] ptxd_make_world_inject: Spring cleanup and optional dest dir Michael Riesch

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=20240512131642.3703640-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ada@thorsis.com \
    --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