On Fri, Jul 05, 2013 at 05:06:03PM +0200, Christopher Huhn, GSI wrote: > I just stumbled upon "grep-available -w -P libstdc++6" not finding any > package. > > Obviously '+' signs are not treated as literals but regex operators and > consequently > "grep-available -w -P 'libstdc\+\+6'" properly locates the package. > "grep-available -X -P libstdc++6" works as anticipated by me. > > Is this the expected behaviour? > If so maybe the manpage should be a bit more verbose about the exact > semantics > (and possible use) of -w.
The manpage says this about -w: -w, --whole-pkg Do an extended regular expression match on whole package names, assuming the syntax of inter-package relationship fields such as Depends,Recommends, ... When this flag is given you should not worry about sub-package names such as "libpcre3" also matching "libpcre3-dev". This flag implies (and is incompatible with) -e. The idea is, if I recall correctly, to allow you to see if a particular package name (and not some other package name that happens to contain it as a substring) occurs in a Depends field. See #383921 for background. Combining -w with -P isn't particularly useful, as the Package field does not use Depends syntax. You may want to use -PX instead. However, I note the man page excerpt above says "an extended regular expression match" and "This flag implies (and is incompatible with) -e" which to me pretty clearly seems to say that the pattern must follow eregexp syntax. Can you suggest a clearer wording? -- Antti-Juhani Kaijanaho -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org