Comment 1 for bug 868501

Revision history for this message
Martin Pitt (pitti) wrote :

We can infer from ProcMaps when LD_* libraries were used to load libraries from e. g. /usr/local or /home. The generic hook already does that check and tags a bug with "local-libs" if that happens:

------------------ 8< --------------------
    # using local libraries?
    if 'ProcMaps' in report:
        local_libs = set()
        for lib in re.finditer(r'\s(/[^ ]+\.so[.0-9]*)$', report['ProcMaps'], re.M):
            if not apport.fileutils.likely_packaged(lib.group(1)):
                local_libs.add(lib.group(1))
        if local_libs:
            if not ui.yesno('''The crashed program seems to use third-party or local libraries:

%s

It is highly recommended to check if the problem persists without those first.

Do you want to continue the report process anyway?
''' % '\n'.join(local_libs)):
                raise StopIteration
            report['LocalLibraries'] = ' '.join(local_libs)
            report['Tags'] = (report.get('Tags', '') + ' local-libs').strip()
------------------ 8< --------------------

Is that sufficient for your purpose?

What do you want to get out of $DISPLAY, just knowing that it's set? The particular value probably isn't very interesting?