mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <mol@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [APPLIED] rootfs: Fix handling of empty variables
Date: Fri, 05 Feb 2021 07:50:34 +0100	[thread overview]
Message-ID: <E1l7uws-007w8w-HB@dude03.red.stw.pengutronix.de> (raw)
In-Reply-To: <20210203081236.25228-1-s.hauer@pengutronix.de>

Thanks, applied as e036dee4b718fef1c07b7313b2560a2494b3cc7a.

Michael

[sent from post-receive hook]

On Fri, 05 Feb 2021 07:50:34 +0100, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> $(PTXCONF_PROJECT_VENDOR) and $(PTXCONF_ROOTFS_ETC_HOSTNAME) can be
> empty variables in which case bash answers with:
> 
> /bin/bash: command substitution: line 0: syntax error near unexpected token `newline'
> /bin/bash: command substitution: line 0: `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< '
> 
> Fix this warning by adding quotes to make the empty string explicit.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Message-Id: <20210203081236.25228-1-s.hauer@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/rootfs.make b/rules/rootfs.make
> index 419ca001e4ac..1c1e5501cf83 100644
> --- a/rules/rootfs.make
> +++ b/rules/rootfs.make
> @@ -217,12 +217,14 @@ ifdef PTXCONF_ROOTFS_ISSUE
>  		$(call remove_quotes,$(PTXCONF_ROOTFS_ETC_HOSTNAME)))
>  	@$(call install_replace_figlet, rootfs, /etc/issue, \
>  		@FIGLET:VENDOR@, \
> -		`sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_PROJECT_VENDOR)`, \
> -		etcissue)
> +		`sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< \
> +			"$(call remove_quotes,$(PTXCONF_PROJECT_VENDOR))"`, \
> +			etcissue)
>  	@$(call install_replace_figlet, rootfs, /etc/issue, \
>  		@FIGLET:HOSTNAME@, \
> -		`sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_ROOTFS_ETC_HOSTNAME)`, \
> -		etcissue)
> +		`sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< \
> +			"$(call remove_quotes,$(PTXCONF_ROOTFS_ETC_HOSTNAME))"`, \
> +			etcissue)
>  endif
>  
>  ifdef PTXCONF_ROOTFS_HOSTS

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

      reply	other threads:[~2021-02-05  6:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  8:12 [ptxdist] [PATCHi v2] " Sascha Hauer
2021-02-05  6:50 ` 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=E1l7uws-007w8w-HB@dude03.red.stw.pengutronix.de \
    --to=mol@pengutronix.de \
    --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