diff --git a/checkrestart.8 b/checkrestart.8 index 6d9fe88..ff9d0fd 100644 --- a/checkrestart.8 +++ b/checkrestart.8 @@ -206,7 +206,7 @@ .IP \(em The output of running the following command as root: .PP - lsof | egrep 'delete|DEL|path inode' + lsof | grep -E 'delete|DEL|path inode' .PP .P diff --git a/debian/changelog b/debian/changelog index b6e326d..647bcbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debian-goodies (0.89) UNRELEASED; urgency=medium + + * Replace calls to egrep and fgrep with grep and the according options. + (Closes: #1019328) Thanks to Vincent Lefevre for the reminder. + + -- Axel Beckert Fri, 09 Sep 2022 12:18:18 +0200 + debian-goodies (0.88) unstable; urgency=low [ Axel Beckert ] diff --git a/dglob b/dglob index de6c86d..83dc143 100755 --- a/dglob +++ b/dglob @@ -62,7 +62,7 @@ done pattern="$1" -if echo "$pattern" | fgrep -q ":"; then +if echo "$pattern" | grep -Fq ":"; then package=$(echo "$pattern" | awk -F: '{print $1}') arch=$(echo "$pattern" | awk -F: '{print $2}') archfilter="grep-dctrl -FArchitecture $arch" diff --git a/dgrep b/dgrep index c649263..8dc6b56 100755 --- a/dgrep +++ b/dgrep @@ -66,4 +66,10 @@ shift done -for pkgglob in "$@"; do dglob -0f "$pkgglob"; done | xargs -0r $prog $opts "$pat" +# *SIGH*, unfortunately needed for GNU grep 3.8 +case "$prog" in + egrep) prog=grep; opts="$opts -E" ;; + fgrep) prog=grep; opts="$opts -F" ;; +esac + +for pkgglob in "$@"; do dglob -0f "$pkgglob"; done | xargs -0r "$prog" $opts "$pat" diff --git a/dgrep.pod b/dgrep.pod index d43ee5c..aaa4987 100644 --- a/dgrep.pod +++ b/dgrep.pod @@ -17,8 +17,9 @@ in those packages. It uses dglob's substring pattern matching for the package names. -If B is invoked as B, B or B then L, -L or L is used instead of L. +If B is invoked as B, B or B, etc. then +L with option C<-E> or C<-F> respectively the command +L is used instead of L. =head1 OPTIONS @@ -61,4 +62,4 @@ =head1 SEE ALSO -L, L, L, L, L, L, L +L, L, L, L, L diff --git a/dman b/dman index 51f8bc1..6251cbf 100755 --- a/dman +++ b/dman @@ -49,8 +49,8 @@ file=$2 curl $CURLOPTS "$url" >"$file" 2>/dev/null if ! [ -s "$file" ] || - egrep -q "403.*Forbidden" "$file" || - egrep -q "

Manpage not found

" "$file" ; then + grep -Eq "403.*Forbidden" "$file" || + grep -Eq "

Manpage not found

" "$file" ; then return 1 fi return 0 diff --git a/which-pkg-broke-build b/which-pkg-broke-build index b7de15a..da7229f 100755 --- a/which-pkg-broke-build +++ b/which-pkg-broke-build @@ -22,7 +22,7 @@ elif [ -n "$srcdir" ]; then cat debian/control | sed ':a;N;$!ba;s/\(Build-Depends[^ ]*:[^\n:]*\)\n/\1 /g' fi | \ - fgrep Build-Depends | \ + grep -F Build-Depends | \ tr '|,' ' ' | \ sed -e 's/^Build-Depends[^ ]*://; s/([^()]*)//g; s/<[^<>]*>//g; s/\[[^]]*\]//g;' ) @@ -31,7 +31,7 @@ for pkg in $bd; do which-pkg-broke $pkg done | \ - fgrep -v "has no install time info" | \ + grep -Fv "has no install time info" | \ while read pkg date; do echo `date +%s -d "$date"` $pkg done | \