Hi, El 14/09/22 a las 09:04, Jochen Sprickerhof escribió: > Package: grep > Version: 3.8-2 > Severity: serious > > Hi, > > the new grep versions issues a warning on stderr: > > stderr: /usr/bin/grep: warning: stray \ before -
FTR, this warning relates to: Regular expressions with stray backslashes now cause warnings, as their unspecified behavior can lead to unexpected results. For example, '\a' and 'a' are not always equivalent <https://bugs.gnu.org/39678>. Similarly, regular expressions or subexpressions that start with a repetition operator now also cause warnings due to their unspecified behavior; for example, *a(+b|{1}c) now has three reasons to warn. The warnings are intended as a transition aid; they are likely to be errors in future releases. > > this causes build failures: > > https://tests.reproducible-builds.org/debian/rb-pkg/unstable/arm64/libtool.html > > and also autopkgtest failures: > > https://ci.debian.net/data/autopkgtest/unstable/amd64/d/dpkg/26032114/log.gz > https://ci.debian.net/data/autopkgtest/unstable/amd64/c/cjet/26041201/log.gz > > The first autopkgtest failure is in libtool which is vendored by a lot > of packages so will probably take a long time to fix. > Fixing this would require fixing libtool only, isn't that right? > Could you maybe silence the warning for now? > Let's see how difficult is to fix this in libtool (and in any other potentially affected package) first. Let me also add some rationale from upstream, quoting it from https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57604#47: El 08/09/22 a las 02:21, Jim Meyering escribió: > Hi Karl, > > Sorry to cause you grief, but... > > On Wed, Sep 7, 2022 at 7:49 PM Karl Berry <k...@freefriends.org> wrote: [snip] > > $ grep '\Q' /dev/null > > grep: warning: stray \ before Q > > > It would be nice to be able to turn those off too. (It hit me today.) > > I would argue that it is (...) important to retain these > stray-backslash warnings, because they tend to highlight real bugs. > Consider these uses of \d: > > $ echo d | grep-3.7 '\d' > d > $ echo d | grep-3.8 '\d' > grep: warning: stray \ before d > > Anyone used to PCRE regexps (who isn't, these days) knows that its > "\d" is intended to match a digit, not the letter "d". With grep-3.7, > you'd get misbehavior and no warning about your error. With grep-3.8, > you'll get the diagnostic and maybe switch to using "grep -P", where > "\d" works as expected -- switching from \d to [0-9] hurts readability > and feels like dumbing-down, especially when there are two or more \d > uses. Using PCRE's \Q...\E groups *without -P* is another issue that > is now diagnosed. > ... > Should be this one: > > https://sources.debian.org/src/grep/3.8-2/lib/dfa.c/#L1564 > > Cheers Jochen > > P.S.: I will send a bug with a patch to the libtool maintainer. Please do. Cheers, -- Santiago P.S. I am letting Severity: serious for now to prevent migration to testing. But *I* am considering this rather Severity: important, at most.
signature.asc
Description: PGP signature