From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7265B158091 for ; Thu, 19 May 2022 04:30:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 161C7E08C4; Thu, 19 May 2022 04:30:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E8FBFE08C4 for ; Thu, 19 May 2022 04:30:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 068493416E6 for ; Thu, 19 May 2022 04:30:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5F9253B5 for ; Thu, 19 May 2022 04:30:35 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1652593690.049b80cd6b4ffe3929fd95a9f9b21582fd2373f4.sam@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: bin/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: bin/euse X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 049b80cd6b4ffe3929fd95a9f9b21582fd2373f4 X-VCS-Branch: master Date: Thu, 19 May 2022 04:30:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c221a301-90df-45bd-85bf-b09fecdab5a7 X-Archives-Hash: b5e1d22cffb1f1cb8843af4d0cac3ac9 commit: 049b80cd6b4ffe3929fd95a9f9b21582fd2373f4 Author: Sam James gentoo org> AuthorDate: Sun May 15 05:47:58 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun May 15 05:48:10 2022 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=049b80cd euse: egrep -> grep -E egrep is considered an obsolete alias and newer greps will warn on this. Signed-off-by: Sam James gentoo.org> bin/euse | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/euse b/bin/euse index c3b6638..daffd66 100755 --- a/bin/euse +++ b/bin/euse @@ -338,11 +338,11 @@ get_useflaglist() { descdir="${profiledir}/profiles" if [[ -z ${SCOPE} || ${SCOPE} == "global" ]]; then [[ ! -s "${descdir}/use.desc" ]] && continue - egrep "^[^# ]+ +-" "${descdir}/use.desc" + grep -E "^[^# ]+ +-" "${descdir}/use.desc" fi if [[ -z ${SCOPE} || ${SCOPE} == "local" ]]; then [[ ! -s "${descdir}/use.local.desc" ]] && continue - egrep "^[^# :]+:[^ ]+ +-" "${descdir}/use.local.desc" \ + grep -E "^[^# :]+:[^ ]+ +-" "${descdir}/use.local.desc" \ | cut -d: -f 2 fi done | cut -d " " -f1 | sort --field=":" --key=1,1 --unique @@ -370,7 +370,7 @@ get_useflaglist() { # ACTIVE_FLAGS - Array of current use flag info # get_useflaglist_ebuild() { - local known=$(echo "${ACTIVE_FLAGS[5]}" | egrep "^${1}") + local known=$(echo "${ACTIVE_FLAGS[5]}" | grep -E "^${1}") local cacheformat if [[ -n $known ]]; then # No need to recache @@ -397,7 +397,7 @@ get_useflaglist_ebuild() { return 1 fi append=$(set +f; ls ${portdir}/metadata/${cacheformat}/${1}-* \ - | egrep "${1}-[0-9.]+" \ + | grep -E "${1}-[0-9.]+" \ | sed -e "s:${portdir}/metadata/${cacheformat}/${1}-::g" \ | while read -d $'\n' version; do IFS=$'\n' @@ -454,7 +454,7 @@ traverse_profile() { curdir="${2:-$(get_real_path ${MAKE_PROFILE_PATH})}" if [[ -f "${curdir}/parent" ]]; then - for parent in $(egrep -v '(^#|^ *$)' ${curdir}/parent); do + for parent in $(grep -E -v '(^#|^ *$)' ${curdir}/parent); do # Bug 231394, handle parent path being absolute index=$(expr index "${parent}" :) if [[ ${parent:0:1} == "/" ]]; then @@ -906,9 +906,9 @@ showflags() { get_flagstatus ${1} echo fi - if echo " ${ACTIVE_FLAGS[4]} " | egrep -e " -?${1} " > /dev/null; then + if echo " ${ACTIVE_FLAGS[4]} " | grep -E -e " -?${1} " > /dev/null; then for pkg in $( echo "${ACTIVE_FLAGS[4]}" | \ - egrep " -?${1} " | cut -d " " -f 2); do + grep -E " -?${1} " | cut -d " " -f 2); do printf "%-20s" ${1} SCOPE="local" get_flagstatus ${1} "${pkg}" printf "(%s)\n" ${pkg} @@ -992,7 +992,7 @@ scrub_use_flag() { # If line only has this use flag, let it be removed # (used if PACKAGE is not defined -- from pruning) elif [[ -n $(echo "${line}" | \ - egrep "^[^#]*${atom_re}.*-?${flag}") ]]; then + grep -E "^[^#]*${atom_re}.*-?${flag}") ]]; then echo "Removing use flag from ${line}" >&2 if [[ -z $(echo "${line}" | \ grep -Ee "${atom_re} *-?${flag} *$") ]]; then @@ -1068,10 +1068,10 @@ modify_package() { # XXX: Handle version or version wildcard? warn "USE flag \"${flag}\" is not used by $PACKAGE" # Don't necessarily bail for this, just warn - elif [[ -n "${V}" && -z "$(egrep "<|>|=" <<< "${PACKAGE:0:1}")" ]]; then + elif [[ -n "${V}" && -z "$(grep -E "<|>|=" <<< "${PACKAGE:0:1}")" ]]; then error "Invalid package atom. Did you forget the leading '='?" continue - elif [[ -z "${V}" && -n "$(egrep "<|>|=" <<< "${PACKAGE:0:1}")" ]]; then + elif [[ -z "${V}" && -n "$(grep -E "<|>|=" <<< "${PACKAGE:0:1}")" ]]; then error "Invalid package atom. Did you forget the version?" continue fi @@ -1114,7 +1114,7 @@ modify_package() { echo "Adding \"${PACKAGE}[${flag}]\" use flag in \"${filename}\"" local added=0 while read line; do - if [[ -n $(echo "${line}" | egrep -e "^[^#]*${PACKAGE} ") ]]; then + if [[ -n $(echo "${line}" | grep -E -e "^[^#]*${PACKAGE} ") ]]; then echo $(reduce_package_use "${line} ${flag}") added=1 else @@ -1131,7 +1131,7 @@ modify_package() { local filename if [[ -d ${PACKAGE_USE_PATH} ]]; then # Scan for file containing named package and use flag - filename=$(egrep -rle "${pkg_re}.*[^-]${flag}( |$)" "${PACKAGE_USE_PATH}") + filename=$(grep -E -rle "${pkg_re}.*[^-]${flag}( |$)" "${PACKAGE_USE_PATH}") if [[ -z "${filename}" ]]; then error ""${flag}" is not defined for package "${PACKAGE}"" continue @@ -1251,7 +1251,7 @@ modify() { # as the ending quote if [ "${line:0:4}" == "USE=" ]; then inuse=1; line=${line:5}; fi [ "${inuse}" == "0" ] && echo -E "${line}" - if [ "${inuse}" == "1" ] && echo "${line}" | egrep '" *(#.*)?$' > /dev/null; then + if [ "${inuse}" == "1" ] && echo "${line}" | grep -E '" *(#.*)?$' > /dev/null; then echo -n 'USE="' echo -ne "${NEW_MAKE_CONF_USE_2%% }" echo '"'