mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] replace egrep with grep -E
Date: Thu, 11 May 2023 07:55:32 +0200	[thread overview]
Message-ID: <20230511055532.1980290-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20230505201551.903822-1-l.stach@pengutronix.de>

Thanks, applied as c3530731f85190b29ffdab09bd2753df5a74e6e8.

Michael

[sent from post-receive hook]

On Thu, 11 May 2023 07:55:32 +0200, Lucas Stach <l.stach@pengutronix.de> wrote:
> Starting with grep 3.8, using egrep emits a warning:
> egrep: warning: egrep is obsolescent; using grep -E
> 
> Replace all usages of egrep, which has been deprecated
> since release 2.5.3 (2007), with grep -E.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Message-Id: <20230505201551.903822-1-l.stach@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/bin/ptxdist b/bin/ptxdist
> index 724c2b0d9e60..8ede9b211051 100755
> --- a/bin/ptxdist
> +++ b/bin/ptxdist
> @@ -1410,7 +1410,7 @@ do_select()
>  	fi
>  
>  	# check if magic is present in config file
> -	if ! egrep -q "^${magic}$" "${file}" && [ -z "${PTXDIST_FORCE}" ]; then
> +	if ! grep -E -q "^${magic}$" "${file}" && [ -z "${PTXDIST_FORCE}" ]; then
>  		ptxd_dialog_msgbox \
>  			"error: Couldn't verify that\n" \
>  			"	'${file}'\n" \
> @@ -2211,7 +2211,7 @@ setup_env() {
>  	unset $({
>  		export -p  | sed -n 's/^declare -x \([^=]*\).*$/\1/p'
>  		export -fp | sed -n 's/^declare -fx \([^=]*\).*$/\1/p'
> -		} | egrep -v "^(PTXDIST_PTXRC|PTX_AUTOBUILD_DESTDIR|CCACHE_.*|PWD|HOME|USER|PATH|TERM|COLUMNS|LINES|DISPLAY|TMPDIR|KCONFIG_ALLCONFIG|KCONFIG_SEED|http_proxy|https_proxy|ftp_proxy|no_proxy${whitelist})$")
> +		} | grep -E -v "^(PTXDIST_PTXRC|PTX_AUTOBUILD_DESTDIR|CCACHE_.*|PWD|HOME|USER|PATH|TERM|COLUMNS|LINES|DISPLAY|TMPDIR|KCONFIG_ALLCONFIG|KCONFIG_SEED|http_proxy|https_proxy|ftp_proxy|no_proxy${whitelist})$")
>  
>  	######## the environment is clean now ########
>  
> @@ -2361,7 +2361,7 @@ setup_parallel() {
>  
>  	# this one is for Linux
>  	if [ -r /proc/cpuinfo ]; then
> -		cpus="$(egrep '^(processor|cpu	)' /proc/cpuinfo | wc -l)"
> +		cpus="$(grep -E '^(processor|cpu	)' /proc/cpuinfo | wc -l)"
>  		if [ ${cpus} -eq 0 ]; then
>  			cpus=1
>  		fi
> diff --git a/configure.ac b/configure.ac
> index efd4bac52a88..43e00f86ed37 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -172,9 +172,6 @@ GNU_TOOL(tar, tar)
>  GNU_TOOL(find, findutils)
>  GNU_TOOL(xargs, findutils)
>  
> -dnl Check for egrep
> -AC_PROG_EGREP
> -
>  dnl Check for awk
>  AC_PROG_AWK
>  AC_PATH_PROGS(AWK, ${AWK},)
> diff --git a/scripts/lib/ptxd_make_image_fix_permissions.sh b/scripts/lib/ptxd_make_image_fix_permissions.sh
> index bf1a2c816b0f..f53f45baee1d 100644
> --- a/scripts/lib/ptxd_make_image_fix_permissions.sh
> +++ b/scripts/lib/ptxd_make_image_fix_permissions.sh
> @@ -35,7 +35,7 @@ ptxd_make_image_fix_permissions_check() {
>      ptxd_check_obsolete_perm "${ptxd_reply_perm_files[@]}"
>  
>      # just care about dev-nodes, for now
> -    egrep -h "^[n]${IFS}" "${ptxd_reply_perm_files[@]}" |
> +    grep -E -h "^[n]${IFS}" "${ptxd_reply_perm_files[@]}" |
>      while read kind file uid_should gid_should prm_should type major_should minor_should; do
>  	local fixup=false
>  	file="${workdir}/${file#/}"
> diff --git a/scripts/ptx-file_check b/scripts/ptx-file_check
> index 51bf9ed634ac..3b564aca06ec 100755
> --- a/scripts/ptx-file_check
> +++ b/scripts/ptx-file_check
> @@ -134,7 +134,7 @@ create_md5(){
>  		debug_out "ROOT Directory is >$(pwd)<"
>  		RELEASEDIR=$STORE/$RELEASE
>  		mkdir -p "$RELEASEDIR" || my_exit "mkdir $ROOT/$RELEASEDIR failed" 1
> -		find . -type f | egrep -v "/sys/|/proc/|/dev/|/mnt|/$STORE" > $RELEASEDIR/files.list
> +		find . -type f | grep -E -v "/sys/|/proc/|/dev/|/mnt|/$STORE" > $RELEASEDIR/files.list
>  		LC_ALL=C sort -u $RELEASEDIR/files.list > $RELEASEDIR/files.list.tmp && mv $RELEASEDIR/files.list.tmp $RELEASEDIR/files.list
>  		while read line ; do 
>  			md5sum $line 
> @@ -159,14 +159,14 @@ check_md5(){
>  		md5sum -c $RELEASEDIR/files.md5 | grep -v OK | sed s/:\ FAILED//g>> $LOCALSTATSDIR/check-md5.status
>  		echo "------------ END -------------" >> $LOCALSTATSDIR/check-md5.status
>  		#
> -		find . -type f | egrep -v "/sys/|/proc/|/dev/|/mnt|/$STORE" > $LOCALSTATSDIR/files.list
> +		find . -type f | grep -E -v "/sys/|/proc/|/dev/|/mnt|/$STORE" > $LOCALSTATSDIR/files.list
>  		LC_ALL=C sort -u $LOCALSTATSDIR/files.list > $LOCALSTATSDIR/files.list.tmp && mv $LOCALSTATSDIR/files.list.tmp $LOCALSTATSDIR/files.list
>  		echo "# $(date)" > $LOCALSTATSDIR/check-files.status
>  		echo "# These files do not appear in release $RELEASE, " >> $LOCALSTATSDIR/check-files.status
>  		echo "# however - they appear on the system:" >> $LOCALSTATSDIR/check-files.status
>  		echo "# " >> $LOCALSTATSDIR/check-files.status
>  		echo "----------- START ------------" >> $LOCALSTATSDIR/check-files.status
> -		diff $RELEASEDIR/files.list $LOCALSTATSDIR/files.list | egrep "<|>" | sed s/'[><][ ][\.]'//g >> $LOCALSTATSDIR/check-files.status
> +		diff $RELEASEDIR/files.list $LOCALSTATSDIR/files.list | grep -E "<|>" | sed s/'[><][ ][\.]'//g >> $LOCALSTATSDIR/check-files.status
>  		echo "------------ END -------------" >> $LOCALSTATSDIR/check-files.status
>  		#
>  		if [ "$REPORT" = "true" ]; then 
> @@ -211,7 +211,7 @@ check_ipkglist(){
>  		echo "# These package versions differ from release $RELEASE:" >> $LOCALSTATSDIR/check-ipkglist.status
>  		echo "# " >> $LOCALSTATSDIR/check-ipkglist.status
>  		echo "----------- START ------------" >> $LOCALSTATSDIR/check-ipkglist.status
> -		diff $RELEASEDIR/ipkg.list $LOCALSTATSDIR/ipkg.list | egrep ">" | sed s/'[><][ ]'//g >> $LOCALSTATSDIR/check-ipkglist.status
> +		diff $RELEASEDIR/ipkg.list $LOCALSTATSDIR/ipkg.list | grep -E ">" | sed s/'[><][ ]'//g >> $LOCALSTATSDIR/check-ipkglist.status
>  		echo "------------ END -------------" >> $LOCALSTATSDIR/check-ipkglist.status
>  		#
>  		if [ "$REPORT" = "true" ]; then 



      reply	other threads:[~2023-05-11  5:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 20:15 [ptxdist] [PATCH] " Lucas Stach
2023-05-11  5:55 ` 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=20230511055532.1980290-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=l.stach@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