← Back to team overview

desktop-packages team mailing list archive

[Bug 845730] Re: bug patterns need to escape parentheses

 

Right, all matches in bug patterns are regular expressions, and '(',
')', '+', '?' etc. are magic characters in regexps and thus need to be
escaped. As I don't want to restrict the power of regexps there, I'm
afraid it needs to stay as it is.

** Summary changed:

- Title and OriginalTitle field of bugpatterns behaves oddly
+ bug patterns need to escape parentheses

** Changed in: apport (Ubuntu)
   Importance: Medium => Low

** Changed in: apport (Ubuntu)
       Status: Confirmed => Invalid

** Changed in: apport
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/845730

Title:
  bug patterns need to escape parentheses

Status in Apport crash detection/reporting:
  Invalid
Status in “apport” package in Ubuntu:
  Invalid

Bug description:
  We've discovered that when writing bug patterns it isn't necessary to
  escape parens "()" in the Title and OriginalTitle key of bug patterns.
  For example:

  <pattern url="https://launchpad.net/bugs/832745";>
  <re key="Package">^update-manager </re>
  <re key="OriginalTitle">update-manager crashed with TypeError in confirmChanges\(\)</re>
  <re key="Traceback">TypeError: glib.markup_escape_text\(\) takes at most 1 argument \(2 given\)</re>
  </pattern>

  The pattern above matches when used with test-local from the
  bugpatterns branch (rev  329) and so does:

  <pattern url="https://launchpad.net/bugs/832745";>
  <re key="Package">^update-manager </re>
  <re key="OriginalTitle">update-manager crashed with TypeError in confirmChanges()</re>
  <re key="Traceback">TypeError: glib.markup_escape_text\(\) takes at most 1 argument \(2 given\)</re>
  </pattern>

  However, if one were to remove the escaping of parens in the Traceback
  key of the pattern the pattern would not match.  This makes little
  sense and inspecting the code of both test-local and the
  "_check_bug_pattern" function of apport/report.py gives no indication
  why this might be.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: apport 1.22.1-0ubuntu2
  ProcVersionSignature: Ubuntu 3.0.0-10.16-generic 3.0.4
  Uname: Linux 3.0.0-10-generic x86_64
  ApportLog:
   
  ApportVersion: 1.22.1-0ubuntu2
  Architecture: amd64
  CheckboxSubmission: fee5e196cb921cbd36888f428b38b488
  CheckboxSystem: 2a6f54df59af338184485e85cbcf0d32
  Date: Fri Sep  9 08:26:57 2011
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/zsh
  SourcePackage: apport
  UpgradeStatus: Upgraded to oneiric on 2011-09-06 (2 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/845730/+subscriptions