Your message dated Sun, 06 Jun 2010 10:43:56 -0400
with message-id <7066.1275835...@mixed>
and subject line php-mode: Setup occurs even if package is removed
has caused the Debian Bug report #584700,
regarding php-mode: Setup occurs even if package is removed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
584700: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584700
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: php-mode
Version: 1.5.0-1
Severity: normal
Tags: patch

Suppose I install and then remove php-elisp.  This file remains:

/etc/emacs/site-start.d/50php-elisp.el 

because it is a conffile.  Fine.  But then I start Emacs and open a .php
file and get the error:

File mode specification error: (file-error "Cannot open load file" 
"php-elisp/php-mode")

This is because the code:

(setq auto-mode-alist
      (cons '("\\.php[34]?\\'\\|\\.phtml\\." . php-mode) auto-mode-alist))
(autoload 'php-mode "php-elisp/php-mode" "mode for editing php files" t)

in 50php-elisp.el is run unconditionally.  I recommend code that detects
(1) whether the package has been removed but not purged and (2) whether
the package has been correctly byte-compiled.

A better /etc/emacs/site-start.d/50php-elisp.el file is attached which
you can use as debian/emacsen-startup

Thanks,
Peter

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
;; -*-emacs-lisp-*-
;;
;; Emacs startup file for the Debian GNU/Linux php-elisp package
;;
;; Originally contributed by Nils Naumann <naum...@unileoben.ac.at>
;; Modified by Dirk Eddelbuettel <e...@debian.org>
;; Adapted for dh-make by Jim Van Zandt <j...@vanzandt.mv.com>

;; Peter S Galbraith <p...@debian.org>  2010-06-05
;;  Check if package is installed and correctly byte-compiled.

;; The php-elisp package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
;; xemacs19, emacs20, xemacs20...).  The compiled code is then
;; installed in a subdirectory of the respective site-lisp directory.


(cond
 ((not (file-exists-p "/usr/share/emacs/site-lisp/php-elisp/php-mode.el"))
  (message
   "Package php-elisp removed but not purged.  Skipping setup."))
 ((not (file-exists-p (concat "/usr/share/"
                              (symbol-name debian-emacs-flavor)
                              "/site-lisp/php-elisp/php-mode.elc")))
  (message "Package php-elisp is not fully installed.  Skipping setup."))
 (t 
  (setq auto-mode-alist
	(cons '("\\.php[34]?\\'\\|\\.phtml\\." . php-mode) auto-mode-alist))
  (autoload 'php-mode "php-elisp/php-mode" "mode for editing php files" t)))

--- End Message ---
--- Begin Message ---
Opps... wrong package name!
I'll open a new bug.
-- 
Peter S. Galbraith, Debian Developer          <p...@debian.org>
                                 http://people.debian.org/~psg
GPG key 4096/70D4A979 6309 28AE 8EB3 AB57 22F3  03BC 17DC 3CC4 70D4 A979


--- End Message ---

Reply via email to