diff -u apport-2.14.1/debian/changelog apport-2.14.1/debian/changelog --- apport-2.14.1/debian/changelog +++ apport-2.14.1/debian/changelog @@ -1,3 +1,11 @@ +apport (2.14.1-0ubuntu3) trusty; urgency=medium + + * Cherry-pick from trunk: Delay the import of the glob and re modules in the + python apport hook, and only import them when needed. Speeds up + interpreter startup time by 50%. (LP: #1307684) + + -- Matthias Klose Tue, 15 Apr 2014 08:42:00 +0200 + apport (2.14.1-0ubuntu2) trusty; urgency=medium * etc/apport/crashdb.conf: Disable Launchpad crash/kernel reports for only in patch2: unchanged: --- apport-2.14.1.orig/NEWS +++ apport-2.14.1/NEWS @@ -1,6 +1,12 @@ This file summarizes the major and interesting changes for each release. For a detailled list of changes, please see ChangeLog. +2.14.2 (UNRELEASED) +------------------- + * Delay the import of the glob and re modules in the python apport hook, + and only import them when needed. Speeds up interpreter startup time + by 50%. Thanks Matthias Klose! (LP: #1307684) + 2.14.1 (2014-04-04) ------------------- * Fix FileNotFoundError from temporary launchpadlib cache dir cleanup. only in patch2: unchanged: --- apport-2.14.1.orig/apport_python_hook.py +++ apport-2.14.1/apport_python_hook.py @@ -12,8 +12,6 @@ import os import sys -import re -from glob import glob CONFIG = '/etc/default/apport' @@ -23,6 +21,7 @@ # This doesn't use apport.packaging.enabled() because it is too heavyweight # See LP: #528355 + import re try: with open(CONFIG) as f: conf = f.read() @@ -147,7 +146,8 @@ def dbus_service_unknown_analysis(exc_obj, report): - import subprocess + from glob import glob + import subprocess, re try: from configparser import ConfigParser, NoSectionError, NoOptionError (ConfigParser, NoSectionError, NoOptionError) # pyflakes