Re: PW#5-12: New upload procedure
firstname.lastname@example.org (Christian Schwarz) wrote on 13.01.98 in <199801132234.XAA04243@klee.painters.schwarz-online.com>:
> So, if a package upload fixes some bugs, the maintainer should include
> some tags in the debian/changelog file that use the following syntax
> (Perl regexp syntax, case-insensitive):
> Here is an example for those that do not speak Perl:
> foo (1.0-5) unstable; urgency=low
> * Recompiled with libc6, fixes: Bug#98765, Bug#98766
> * Removed `rm -rf /' from postrm script, fixes:#99999
> -- Wile E. Coyote <email@example.com> Wed, 29 Oct 1997 14:22:37
The regexp doesn't match the example. It does match
fixes: bug#123(, bug#345)))))))))))))))))
which is probably not what you intended :-)
In Perl regular expressions, alphanumeric characters always match
literally unless preceded by a backslash, and non-alphanumeric characters
always match literally if preceded by a backslash.
So, take out the backslashes before the parentheses, and you are fine.
OTOH, every () sets one of the $1 $2 ... variables; if you want to avoid
that (that's more for the actual implementation than for the policy
manual), use (?: ) instead of ( ) to not touch those variables.
Here's a short explanation of the corrected regex:
fixes: matches "fixes:"
\s* matches zero or more whitespace characters
(in C: one of " \t\n\r\f")
bug matches "bug"
(thing)? matches "" or "thing"
\# matches "#"
\d+ matches some digits, at least one
, matches ","
(thing)* matches "", "thing", "thingthing", and so on
/thing/i matches "thing", "Thing", "tHiNg", and so on