apport emacs bugs should include failed byte-compilation logs

Bug #413110 reported by era on 2009-08-13
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Medium
Reinhard Tartler
emacs22 (Ubuntu)
High
Unassigned
emacs23 (Ubuntu)
High
Unassigned
emacsen-common (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: emacsen-common

This is a bit of a feature request, but it would be nice to get this for Karmic.

Bugs such as bug #411939 should include a copy of the requested log file. There are hooks in apport for doing this, but I'm not altogether sure how the pieces should fit together.

> !! Please file a bug report against emacs-snapshot
> !! and attach the file /tmp/emacs-snapshot.SuWGoG

Basically, any line in the dpkg terminal log which matches '!! and attach the file /tmp/x?emacs' and where the file in /tmp still exists should be included, at least as a first cut.

Can emacsen-common install a hook which is used by all emacsen, or will each need to provide its own?

Is there other information which should be included in apport bugs? I'm thinking installed Emacs extensions would be good to have listed as well.

era (era) on 2009-08-13
description: updated
description: updated

On Wed, 11 Nov 2009 08:48 +0000, "Reinhard Tartler"
<email address hidden> wrote in
https://bugs.launchpad.net/ubuntu/+source/emacs22/+bug/480532/comments/2:
> Do you still have the file /tmp/emacs22.SXUs1m on your system? This file
> is essential for processing this issue further. Please attach it to this
> bug.

Maybe I'm pointing out the painfully obvious, but this is the problem I
am attempting to solve with this request. I'm not familiar enough with
apport to know precisely how to make it attach /tmp/emacs*.* files to
the bug report automatically, so I was kind of hoping somebody with the
prerequisite skills would be able to at least briefly instruct me on how
to approach this.

/* era */

--
If this were a real .signature, it would suck less. Well, maybe not.

Reinhard Tartler (siretart) wrote :

triaging this bug. I feel that we should implement this better sooner than later.

Changed in emacsen-common (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Reinhard Tartler (siretart) wrote :

the code that print outs these temporary files is implemented directly in the emacs22/emacs23/emacs-snapshot postinst scripts. All postinst scripts must be "fixed" seperately.

Documenation how to write apport scripts can be found here: https://wiki.ubuntu.com/Apport/DeveloperHowTo

However AFAIUI there is no direct way to invoke apport properly from a postinst script without causing apport to be triggered twice. Does someone know a package that does this properly?

Changed in emacs22 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Changed in emacs23 (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in emacsen-common (Ubuntu):
status: Confirmed → Invalid
Reinhard Tartler (siretart) wrote :

as discussed in https://lists.launchpad.net/ubuntu-elisp/msg00036.html, this is best implemented in apport.

Changed in apport (Ubuntu):
assignee: nobody → Reinhard Tartler (siretart)
status: New → In Progress
importance: Undecided → Medium
Changed in emacs22 (Ubuntu):
status: Confirmed → Invalid
Changed in emacs23 (Ubuntu):
status: Confirmed → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.11-0ubuntu3

---------------
apport (1.11-0ubuntu3) lucid; urgency=low

  * Attach emacs compilation logs in order to assist bug triaging.
    LP: #413110
 -- Reinhard Tartler <email address hidden> Thu, 07 Jan 2010 22:14:45 +0100

Changed in apport (Ubuntu):
status: In Progress → Fix Released
era (era) wrote :

From the bzr branch:
> if report['Package'] in ['emacs22', 'emacs23', 'emacs-snapshot']:

Although I don't have any experience with xemacs, I'm wondering if it shouldn't be included here just like the other emacsen, for completeness if nothing else.

era (era) wrote :

Oh, and by the by, that probably requires the regex a few lines down to be updated a bit as well.

Thanks for your work on this, it's much appreciated!

yes, that seems to be a good idea. Do you have a patch or branch at hand?
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

era (era) wrote :

Nope, I don't, but the change should be trivial -- just change emacs to x?emacs everywhere. This is based on the listing of Emacs package names in the Debian Emacs policy, as included in /usr/share/doc/emacsen-common (I have a slightly old version; this system is still on Jaunty).

As of Karmic, only xemacs21 seems to be availble.

Off the top of my head:

-if report['Package'] in ['emacs22', 'emacs23', 'emacs-snapshot']:
+if report['Package'] in ['emacs22', 'emacs23', 'emacs-snapshot', 'xemacs21']:
            # emacs add-on packages trigger byte compilation, which might fail
            # we are very interested in reading the compilation log to determine
            # where to reassign this report to
- regex = r'^!! Byte-compilation for emacs\S+ failed!'
+ regex = r'^!! Byte-compilation for x?emacs\S+ failed!'
            if 'DpkgTerminalLog' in report and re.search(regex, report['DpkgTerminalLog'], re.MULTILINE):
                for line in report['DpkgTerminalLog'].split('\n'):
                    m = re.search(r'^!! and attach the file (\S+)', line)

Reinhard Tartler (siretart) wrote :

I've uploaded that change now, sorry for the delay
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

era (era) wrote :

Did this ever make it to production? I have yet to see a bug report with an attached byte compilation log.

era (era) wrote :

Ping? I see the code in Lucid but it doesn't appear to be doing anything. Should the hook be moved so it doesn't require the package to be Emacs specifically?

era (era) wrote :

For the record, emacs23 and emacs-snapshot do not store the byte compilation logs in a temporary file. Only emacs22 users would see this, and of course, there aren't a lot of them any more. (Can't remember which category xemacs21 was but I guess it's also not very relevant.)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers