From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 11 May 2023 07:56:14 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pwzHi-00DZkl-VZ for lore@lore.pengutronix.de; Thu, 11 May 2023 07:56:14 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pwzHh-0001tN-GQ; Thu, 11 May 2023 07:56:13 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pwzH3-0001cw-M5; Thu, 11 May 2023 07:55:33 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pwzH3-002efY-1B; Thu, 11 May 2023 07:55:33 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pwzH2-008JAL-7i; Thu, 11 May 2023 07:55:32 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 11 May 2023 07:55:32 +0200 Message-Id: <20230511055532.1980290-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230505201551.903822-1-l.stach@pengutronix.de> References: <20230505201551.903822-1-l.stach@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] replace egrep with grep -E X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Lucas Stach Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as c3530731f85190b29ffdab09bd2753df5a74e6e8. Michael [sent from post-receive hook] On Thu, 11 May 2023 07:55:32 +0200, Lucas Stach 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 > Message-Id: <20230505201551.903822-1-l.stach@pengutronix.de> > Signed-off-by: Michael Olbrich > > 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