summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2009-12-16 23:14:04 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-12-17 10:43:52 +0200
commit79b0ebedc13185f2d85e688d8cd4e007ddea70e1 (patch)
tree5ff4ae70723fe35fd86f4316b40a74497f07bd15
parentedac0476a8ea3fbd1d86df2667a1b62d831b2653 (diff)
downloadlibrpm-tizen-79b0ebedc13185f2d85e688d8cd4e007ddea70e1.tar.gz
librpm-tizen-79b0ebedc13185f2d85e688d8cd4e007ddea70e1.tar.bz2
librpm-tizen-79b0ebedc13185f2d85e688d8cd4e007ddea70e1.zip
Use grep -E and grep -F instead of egrep and fgrep.
egrep and fgrep are deprecated in GNU grep and "historical" in POSIX.
-rw-r--r--INSTALL2
-rw-r--r--autodeps/aix.prov2
-rw-r--r--autodeps/aix4.prov2
-rw-r--r--autodeps/aix4.req2
-rw-r--r--autodeps/darwin.req4
-rw-r--r--autodeps/freebsd.req4
-rw-r--r--autodeps/freebsdelf.req2
-rw-r--r--autodeps/hpux.req2
-rw-r--r--autodeps/irix6.prov2
-rw-r--r--autodeps/irix6.req2
-rw-r--r--autodeps/linux.req4
-rw-r--r--autodeps/openbsd.req4
-rw-r--r--autodeps/osf.prov2
-rw-r--r--autodeps/solaris.req2
-rw-r--r--platform.in2
-rw-r--r--scripts/find-debuginfo.sh14
-rwxr-xr-xscripts/find-provides.php2
-rwxr-xr-xscripts/find-requires.php6
-rw-r--r--scripts/mono-find-provides2
-rw-r--r--scripts/mono-find-requires2
-rwxr-xr-xscripts/vpkg-provides.sh10
21 files changed, 37 insertions, 37 deletions
diff --git a/INSTALL b/INSTALL
index 4df0d117f..bde9efab3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -235,7 +235,7 @@ with:
and if you wish to ensure that some directories are not traversed you
can use the option:
- --ignore_dirs 'egrep|pattern|of|paths|to|ignore
+ --ignore_dirs 'grep-E|pattern|of|paths|to|ignore
By default the generated rpm will include a %verifyscript to verify
checksum of all files traversed has not changed. This additional
diff --git a/autodeps/aix.prov b/autodeps/aix.prov
index 2fab0d0ab..6f7c8bd52 100644
--- a/autodeps/aix.prov
+++ b/autodeps/aix.prov
@@ -59,7 +59,7 @@ find_prov_power()
# Use the verbose version of dump to find the sharable objects
while read f
do
- LANG=C /usr/bin/dump -ov $f/ 2>/dev/null | egrep "^Flags.*SHROBJ|:$" |
+ LANG=C /usr/bin/dump -ov $f/ 2>/dev/null | grep -E "^Flags.*SHROBJ|:$" |
awk 'match($1,":$") { member=$1 }
!match($1,":$") {print member} '
done | sed -e 's/:$//' -e 's/\/\[/\(/g' -e 's/\]/)/g' | xargs -i basename {} |
diff --git a/autodeps/aix4.prov b/autodeps/aix4.prov
index a7aa5fd54..59637a76f 100644
--- a/autodeps/aix4.prov
+++ b/autodeps/aix4.prov
@@ -107,7 +107,7 @@ export LANG
# out.
#
filelist=`sed "s/['\"]/\\\&/g" | xargs file \
- | egrep 'archive|executable|symbolic link' | cut -d: -f1`
+ | grep -E 'archive|executable|symbolic link' | cut -d: -f1`
for f in $filelist
do
diff --git a/autodeps/aix4.req b/autodeps/aix4.req
index 84fb49928..79e988b88 100644
--- a/autodeps/aix4.req
+++ b/autodeps/aix4.req
@@ -45,7 +45,7 @@ LANG=C
export LANG
filelist=`sed "s/['\"]/\\\&/g" | xargs file \
- | egrep '^.*:.*(executable |archive )' | cut -d: -f1`
+ | grep -E '^.*:.*(executable |archive )' | cut -d: -f1`
for f in $filelist
do
diff --git a/autodeps/darwin.req b/autodeps/darwin.req
index 9bb08b753..e571710d8 100644
--- a/autodeps/darwin.req
+++ b/autodeps/darwin.req
@@ -5,8 +5,8 @@
ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
-exelist=`echo $filelist | xargs file | fgrep Mach-O | cut -d: -f1 `
-scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 `
+exelist=`echo $filelist | xargs file | grep -F Mach-O | cut -d: -f1 `
+scriptlist=`echo $filelist | xargs file | grep -E ":.* (commands|script) " | cut -d: -f1 `
for f in $exelist; do
if [ -x $f ]; then
diff --git a/autodeps/freebsd.req b/autodeps/freebsd.req
index c42d93c5a..9a1e0f4aa 100644
--- a/autodeps/freebsd.req
+++ b/autodeps/freebsd.req
@@ -6,8 +6,8 @@
ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
-exelist=`echo $filelist | xargs file | fgrep executable | cut -d: -f1 `
-scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 `
+exelist=`echo $filelist | xargs file | grep -F executable | cut -d: -f1 `
+scriptlist=`echo $filelist | xargs file | grep -E ":.* (commands|script) " | cut -d: -f1 `
for f in $exelist; do
if [ -x $f ]; then
diff --git a/autodeps/freebsdelf.req b/autodeps/freebsdelf.req
index 056d9d9be..dde04c599 100644
--- a/autodeps/freebsdelf.req
+++ b/autodeps/freebsdelf.req
@@ -7,7 +7,7 @@ ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
exelist=`if test "x$filelist" != x; then echo $filelist | xargs file | grep ":.*executable" | cut -d: -f1; fi`
-scriptlist=`if test "x$filelist" != x; then echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1; fi`
+scriptlist=`if test "x$filelist" != x; then echo $filelist | xargs file | grep -E ":.* (commands|script) " | cut -d: -f1; fi`
liblist=`if test "x$filelist" != x; then echo $filelist | xargs file | grep ":.*shared object" | cut -d : -f1; fi`
LDDLIST=`for f in $exelist; do
diff --git a/autodeps/hpux.req b/autodeps/hpux.req
index dd8984f2d..ab7290008 100644
--- a/autodeps/hpux.req
+++ b/autodeps/hpux.req
@@ -84,7 +84,7 @@ do
#
# Is it a shared library?
#
- maybe_shared_lib=`echo "$file_output" | egrep '(executable|library)'`
+ maybe_shared_lib=`echo "$file_output" | grep -E '(executable|library)'`
if test X"$maybe_shared_lib" != X ; then
chatr $f 2>/dev/null \
| awk '
diff --git a/autodeps/irix6.prov b/autodeps/irix6.prov
index 8fb61f23b..87ee4e1a1 100644
--- a/autodeps/irix6.prov
+++ b/autodeps/irix6.prov
@@ -84,7 +84,7 @@ do
#
# If it's a shared library, run elfdump on it.
#
- maybe_shared_lib=`file $f | egrep 'ELF.*dynamic lib'`
+ maybe_shared_lib=`file $f | grep -E 'ELF.*dynamic lib'`
if test X"$maybe_shared_lib" != X ; then
elfdump -L $f 2>/dev/null | awk '
diff --git a/autodeps/irix6.req b/autodeps/irix6.req
index 396cd78c2..72442acf0 100644
--- a/autodeps/irix6.req
+++ b/autodeps/irix6.req
@@ -99,7 +99,7 @@ do
#
# It might be a shared library.
#
- maybe_shared_lib=`echo "$file_output" | egrep 'executable|lib'`
+ maybe_shared_lib=`echo "$file_output" | grep -E 'executable|lib'`
if test X"$maybe_shared_lib" != X ; then
elfdump -Dl $f 2>/dev/null \
diff --git a/autodeps/linux.req b/autodeps/linux.req
index 30e2e5b1c..cf60bd9ac 100644
--- a/autodeps/linux.req
+++ b/autodeps/linux.req
@@ -20,10 +20,10 @@ fi
# --- Grab the file manifest and classify files.
#filelist=`sed "s/['\"]/\\\&/g"`
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
-exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \
+exelist=`echo $filelist | xargs -r file | grep -Ev ":.* (commands|script) " | \
grep ":.*executable" | cut -d: -f1`
scriptlist=`echo $filelist | xargs -r file | \
- egrep ":.* (commands|script) " | cut -d: -f1`
+ grep -E ":.* (commands|script) " | cut -d: -f1`
liblist=`echo $filelist | xargs -r file | \
grep ":.*shared object" | cut -d : -f1`
diff --git a/autodeps/openbsd.req b/autodeps/openbsd.req
index 551ac2cfb..ec3bac728 100644
--- a/autodeps/openbsd.req
+++ b/autodeps/openbsd.req
@@ -6,8 +6,8 @@
ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
-exelist=`echo $filelist | xargs file | fgrep executable | cut -d: -f1 `
-scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 `
+exelist=`echo $filelist | xargs file | grep -F executable | cut -d: -f1 `
+scriptlist=`echo $filelist | xargs file | grep -E ":.* (commands|script) " | cut -d: -f1 `
for f in $exelist; do
if [ -x $f ]; then
diff --git a/autodeps/osf.prov b/autodeps/osf.prov
index 3d7c57b6b..6b5413364 100644
--- a/autodeps/osf.prov
+++ b/autodeps/osf.prov
@@ -79,7 +79,7 @@ do
#
# if it's a shared library, run odump on it.
#
- maybe_shared_lib=`file $f | egrep 'COFF.*shared library'`
+ maybe_shared_lib=`file $f | grep -E 'COFF.*shared library'`
if test X"$maybe_shared_lib" != X ; then
odump -D $f 2>/dev/null | awk '
diff --git a/autodeps/solaris.req b/autodeps/solaris.req
index d0f7f8928..05e40247c 100644
--- a/autodeps/solaris.req
+++ b/autodeps/solaris.req
@@ -10,7 +10,7 @@ ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
[ -z "$filelist" ] && exit #emulate -r option for xargs
-for f in `echo $filelist | xargs file | fgrep executable | cut -d: -f1`; do
+for f in `echo $filelist | xargs file | grep -F executable | cut -d: -f1`; do
ldd $f 2>/dev/null | awk '/\=\>/ { print $1 }'
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
diff --git a/platform.in b/platform.in
index 4a23a9e68..93c66eaad 100644
--- a/platform.in
+++ b/platform.in
@@ -108,7 +108,7 @@
@mandrake@
@mandrake@# make
@mandrake@%_make_bin make
-@mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
+@mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`grep -Ec ^cpu[0-9]+ /proc/stat || :`; fi \
@mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
@mandrake@ NPROCS=1 \
@mandrake@fi \
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 8d86de67e..01456dabc 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -16,7 +16,7 @@
# A -o switch that follows a -p switch or some -l switches produces
# an additional output file with the debuginfo for the files in
# the -l filelist file, or whose names match the -p pattern.
-# The -p argument is an egrep-style regexp matching the a file name,
+# The -p argument is an grep -E -style regexp matching the a file name,
# and must not use anchors (^ or $).
#
# All file names in switches are relative to builddir (. if not given).
@@ -246,7 +246,7 @@ done
if [ -s "$SOURCEFILE" ]; then
mkdir -p "${RPM_BUILD_ROOT}/usr/src/debug"
- LC_ALL=C sort -z -u "$SOURCEFILE" | egrep -v -z '(<internal>|<built-in>)$' |
+ LC_ALL=C sort -z -u "$SOURCEFILE" | grep -E -v -z '(<internal>|<built-in>)$' |
(cd "$RPM_BUILD_DIR"; cpio -pd0mL "${RPM_BUILD_ROOT}/usr/src/debug")
# stupid cpio creates new directories in mode 0700, fixup
find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 |
@@ -268,7 +268,7 @@ fi
# Append to $1 only the lines from stdin not already in the file.
append_uniq()
{
- fgrep -f "$1" -x -v >> "$1"
+ grep -F -f "$1" -x -v >> "$1"
}
# Helper to generate list of corresponding .debug files from a file list.
@@ -288,7 +288,7 @@ filtered_list()
local out="$1"
shift
test $# -gt 0 || return
- fgrep -f <(filelist_debugfiles 's,^.*$,/usr/lib/debug&.debug,' "$@") \
+ grep -F -f <(filelist_debugfiles 's,^.*$,/usr/lib/debug&.debug,' "$@") \
-x $LISTFILE >> $out
sed -n -f <(filelist_debugfiles 's/[\\.*+#]/\\&/g
h
@@ -298,12 +298,12 @@ s,^.*$,s# /usr/lib/debug&.debug$##p,p
' "$@") "$LINKSFILE" | append_uniq "$out"
}
-# Write an output debuginfo file list based on an egrep-style regexp.
+# Write an output debuginfo file list based on an grep -E -style regexp.
pattern_list()
{
local out="$1" ptn="$2"
test -n "$ptn" || return
- egrep -x -e "$ptn" "$LISTFILE" >> "$out"
+ grep -E -x -e "$ptn" "$LISTFILE" >> "$out"
sed -n -r "\#^$ptn #s/ .*\$//p" "$LINKSFILE" | append_uniq "$out"
}
@@ -315,7 +315,7 @@ while ((i < nout)); do
> ${outs[$i]}
filtered_list ${outs[$i]} ${lists[$i]}
pattern_list ${outs[$i]} "${ptns[$i]}"
- fgrep -vx -f ${outs[$i]} "$LISTFILE" > "${LISTFILE}.new"
+ grep -Fvx -f ${outs[$i]} "$LISTFILE" > "${LISTFILE}.new"
mv "${LISTFILE}.new" "$LISTFILE"
((++i))
done
diff --git a/scripts/find-provides.php b/scripts/find-provides.php
index 11178bf37..4e6a03d01 100755
--- a/scripts/find-provides.php
+++ b/scripts/find-provides.php
@@ -8,7 +8,7 @@ filelist=`echo $@`
for i in $filelist; do
i=`echo $i | grep "\.php$"`
if [ -n "$i" ]; then
- j=`cat $i |egrep -i "^Class" |cut -f 2 -d " "| tr -d "\r"`
+ j=`cat $i |grep -E -i "^Class" |cut -f 2 -d " "| tr -d "\r"`
if [ -n "$j" ]; then
for p in $j; do
echo "pear($p)"
diff --git a/scripts/find-requires.php b/scripts/find-requires.php
index 203aefbc8..4c064fcff 100755
--- a/scripts/find-requires.php
+++ b/scripts/find-requires.php
@@ -18,7 +18,7 @@ for files in `echo $@`; do
files=`echo $files | grep "\.php$"`
if [ -n "$files" ]; then
# Requires trough new call:
- j=`cat $files | grep -i new | egrep "(=|return)" | egrep -v "^[[:space:]*]*(\/\/|#|\*|/\*)" | tr -d "\r" | egrep "[;|(|)|{|}|,][[:space:]*]*$" | awk -F "new " '{ print $2 }' | sed "s/[(|;|.]/ /g" | cut -f 1 -d " " | sed "s/^$.*//"`
+ j=`cat $files | grep -i new | grep -E "(=|return)" | grep -E -v "^[[:space:]*]*(\/\/|#|\*|/\*)" | tr -d "\r" | grep -E "[;|(|)|{|}|,][[:space:]*]*$" | awk -F "new " '{ print $2 }' | sed "s/[(|;|.]/ /g" | cut -f 1 -d " " | sed "s/^$.*//"`
if [ -n "$j" ]; then
for feature in $j; do
echo "pear($feature)"
@@ -26,7 +26,7 @@ for files in `echo $@`; do
j=""
fi
# requires trough class extension
- k=`cat $files | egrep -i "(^Class.*extends)" | awk -F " extends " '{ print $2 }' | sed "s/{.*/ /" | cut -f 1 -d " " | tr -d "\r"`
+ k=`cat $files | grep -E -i "(^Class.*extends)" | awk -F " extends " '{ print $2 }' | sed "s/{.*/ /" | cut -f 1 -d " " | tr -d "\r"`
if [ -n "$k" ]; then
for feature in $k; do
echo "pear($feature)"
@@ -34,7 +34,7 @@ for files in `echo $@`; do
k=""
fi
# requires trough class:: call
- l=`cat $files | grep "::" | egrep -v "^[[:space:]*]*(\/\/|#|\*|/\*)" | sed "s/[(|'|!|\"|&|@|;]/ /g" | awk -F "::" '{ print $1 }' | sed "s/.*\ \([:alphanum:]*\)/\1/" | sed "s/^$.*//" | sed "s/[.]//g" | tr -d "\r"`
+ l=`cat $files | grep "::" | grep -E -v "^[[:space:]*]*(\/\/|#|\*|/\*)" | sed "s/[(|'|!|\"|&|@|;]/ /g" | awk -F "::" '{ print $1 }' | sed "s/.*\ \([:alphanum:]*\)/\1/" | sed "s/^$.*//" | sed "s/[.]//g" | tr -d "\r"`
if [ -n "$l" ]; then
for feature in $l; do
echo "pear($feature)"
diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
index 2c808a038..9348457d3 100644
--- a/scripts/mono-find-provides
+++ b/scripts/mono-find-provides
@@ -11,7 +11,7 @@
IFS=$'\n'
filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/'))
-monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
+monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
# If monodis is in the package being installed, use that one
# This is to support building mono
diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
index 66b1f4bc7..ea58cae48 100644
--- a/scripts/mono-find-requires
+++ b/scripts/mono-find-requires
@@ -11,7 +11,7 @@
IFS=$'\n'
filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/'))
-monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
+monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
# If monodis is in the package being installed, use that one
# This is to support building mono
diff --git a/scripts/vpkg-provides.sh b/scripts/vpkg-provides.sh
index b0fbf18f1..78f24b82b 100755
--- a/scripts/vpkg-provides.sh
+++ b/scripts/vpkg-provides.sh
@@ -49,7 +49,7 @@
usage="usage: $0 --spec_header '/path/to/os-base-header.spec' \n"
usage="$usage\t[--find_provides '/path/to/find-provides']\n"
usage="$usage\t[--shlib_dirs 'dirs:which:contain:shared:libs']\n"
-usage="$usage\t[--ignore_dirs 'egrep|pattern|of|paths|to|ignore']\n"
+usage="$usage\t[--ignore_dirs 'grep-E|pattern|of|paths|to|ignore']\n"
# these two should be unnessary as the regular dependency analysis
# should take care of interpreters as well as shared libraries.
@@ -70,7 +70,7 @@ hostname=`uname -n`
# if some subdirectories of the system directories needs to be ignored
# (eg /usr/local is a subdirectory of /usr but should not be part of
# the virtual package) then call this script with ignore_dirs set to a
-# vaild egrep pattern which discribes the directories to ignored.
+# valid grep -E pattern which discribes the directories to ignored.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd
export PATH
@@ -244,7 +244,7 @@ fi
#
for d in `echo $shlib_dirs | sed -e 's/:/ /g'`
do
- find $d -type f -print 2>/dev/null | egrep -v \'$ignore_dirs\' | $find_provides >> $provides_tmp
+ find $d -type f -print 2>/dev/null | grep -E -v \'$ignore_dirs\' | $find_provides >> $provides_tmp
done
sum_tmp=/tmp/sum.$$
@@ -258,7 +258,7 @@ fi
#
for d in `echo $shlib_dirs | sed -e 's/:/ /g'`
do
- find $d -type f -print 2>/dev/null | egrep -v \'$ignore_dirs\' | $sum_cmd >> $sum_tmp
+ find $d -type f -print 2>/dev/null | grep -E -v \'$ignore_dirs\' | $sum_cmd >> $sum_tmp
done
@@ -361,7 +361,7 @@ fi
for d in `echo $shlib_dirs | sed -e 's/:/ /g'`
do
- find \$d -type f -print 2>/dev/null | egrep -v \'$ignore_dirs\' | $sum_cmd >> \$sum_current_tmp
+ find \$d -type f -print 2>/dev/null | grep -E -v \'$ignore_dirs\' | $sum_cmd >> \$sum_current_tmp
done
cat >\$sum_package_tmp <<_EOF_