From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: bin/
Date: Thu, 19 May 2022 04:30:35 +0000 (UTC) [thread overview]
Message-ID: <1652593690.049b80cd6b4ffe3929fd95a9f9b21582fd2373f4.sam@gentoo> (raw)
commit: 049b80cd6b4ffe3929fd95a9f9b21582fd2373f4
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 05:47:58 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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 '"'
next reply other threads:[~2022-05-19 4:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 4:30 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-11-04 21:04 [gentoo-commits] proj/gentoolkit:master commit in: bin/ Sam James
2025-11-04 2:48 Zac Medico
2025-10-11 5:21 Sam James
2025-10-11 5:18 Sam James
2024-06-24 18:05 Matt Turner
2024-06-24 18:05 Matt Turner
2024-06-24 18:05 Matt Turner
2024-05-25 3:45 Matt Turner
2024-05-25 3:45 Matt Turner
2024-05-25 3:45 Matt Turner
2023-08-29 15:48 Mike Gilbert
2023-08-29 1:38 Sam James
2023-08-29 0:51 Sam James
2022-12-03 13:54 Michał Górny
2022-12-03 13:54 Michał Górny
2022-07-28 15:29 Brian Dolbec
2022-07-09 19:50 Brian Dolbec
2021-03-12 2:31 Matt Turner
2021-02-25 0:06 Matt Turner
2020-12-31 22:11 Matt Turner
2020-03-16 14:24 Ben Kohler
2016-10-17 17:39 Paul Varner
2016-06-06 21:15 Paul Varner
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=1652593690.049b80cd6b4ffe3929fd95a9f9b21582fd2373f4.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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