[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: triggers wishlist [emacsen add-on packages]

On Mon, Mar 31, 2008 at 10:31:36AM -0500, Steve Greenland wrote:
> On 30-Mar-08, 15:25 (CDT), Joey Hess <joeyh@debian.org> wrote: 
> > dpkg in experimental supports triggers now, and in many cases trigger
> > support can be added to packages without creating a hard dependency on
> > a new version of dpkg.
> > 
> > Things I want to see use triggers, in approximate priority order:
> The various emacsen-related packages seem to cause multiple re-compiles
> during a single install run. It's not terribly slow, but it's sort of
> annoying.

[cc'ing debian-emacsen so people is aware of this thread]

I am not sure triggers are the right tool here, byte-recompilation can be
enabled by any of package-with-lisp or emacs-package upgrade/install.
emacs packages have no way of knowing at build time which packages-with-lisp
are to be installed, so I am not sure which would be the right triggers.
However, if there is a clean way of using triggers for this I would be
happy to be corrected.

On the other hand the main problem is, as others have pointed out, due to
the noise produced by the lack of a -no-init-file opton. Same byte-compilation
is done twice as much, and sometimes is done just once.

In the meantime I have been experimenting with a different approach. I think
the multiple byte-compilation problem can also be addressed with minor
changes in current behavior, something as shown below in some sort of
pseudo-code. '+' stands for the additional stuff

emacsen-remove: (Run from prerm)
  remove elcdir and its contents

emacsen-install: (Run from postinst)
  set -e
+  if -e elcdir/done
+    skip
+  else 
     create elcdir
     Byte-compile files to elc dir
+    touch elcdir/done
+  fi

So if byte-compilation succeeds a 'done' file is touched and its presence
can be used as a proof of that, so byte-compilation is not retried. On
package or emacs upgrade the elcdir is removed, so byte-complation is tried


Reply to: