Subject: pkg/6232: emacs PLIST will cause pkg_delete to delete files it doesn't own
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@mail.weird.com>
List: netbsd-bugs
Date: 10/02/1998 18:30:18
>Number:         6232
>Category:       pkg
>Synopsis:       emacs PLIST will cause pkg_delete to delete files it doesn't own
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct  2 15:35:00 1998
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        pkgsrc sup 907328973
>Environment:

System: NetBSD most 1.3.2 NetBSD 1.3.2 (MOST) #0: Sun Sep 20 01:28:07 EDT 1998 woods@most:/usr/src-1.3.2/sys/arch/sparc/compile/MOST sparc

>Description:

	The PLIST for the editors/emacs package includes "dangerous"
	@unexecs that will cause files which are not part of the emacs
	package to be deleted.

	(Otherwise I'm much more satisfied with the new and improved
	emacs-20.3 package!)

>How-To-Repeat:

	run "pkg_delete emacs-20.3", re-install emacs, and then wonder
	why the heck none of the local elisp packages work.

	luckily the only file I lost was my rather short and simple
	"default.el":

;; The real stuff is in /usr/local (unless installed here from a pkg)...
(setq local-site-lisp-dir "/usr/local/share/emacs/site-lisp")
(setq load-path (cons local-site-lisp-dir load-path))

(load-file (concat local-site-lisp-dir "/default.el"))

	otherwise I'd be a much less happy little camper....

	(Yeah, I've read all the warnings in the manual pages!)

>Fix:

	Apply the following patch:

Index: PLIST
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/editors/emacs/pkg/PLIST,v
retrieving revision 1.1.1.6
diff -c -r1.1.1.6 PLIST
*** PLIST	1998/09/08 01:32:38	1.1.1.6
--- PLIST	1998/10/02 22:25:17
***************
*** 1374,1380 ****
  @dirrm share/emacs/20.3/lisp/emulation
  @dirrm share/emacs/20.3/lisp/emacs-lisp
  @exec mkdir -p %D/share/emacs/20.3/site-lisp
! @unexec rm -rf %D/share/emacs/20.3/site-lisp
  @exec mkdir -p %D/share/emacs/20.3/leim
  @dirrm share/emacs/20.3/leim
  @dirrm share/emacs/20.3/lisp
--- 1374,1380 ----
  @dirrm share/emacs/20.3/lisp/emulation
  @dirrm share/emacs/20.3/lisp/emacs-lisp
  @exec mkdir -p %D/share/emacs/20.3/site-lisp
! @dirrm share/emacs/20.3/site-lisp
  @exec mkdir -p %D/share/emacs/20.3/leim
  @dirrm share/emacs/20.3/leim
  @dirrm share/emacs/20.3/lisp
***************
*** 1382,1388 ****
  @dirrm share/emacs/20.3/etc
  @dirrm share/emacs/20.3
  @exec mkdir -p %D/share/emacs/site-lisp
! @unexec rm -rf %D/share/emacs/site-lisp
  @dirrm share/emacs
  @dirrm libexec/emacs/20.3/${MACHINE_GNU_ARCH}--netbsd
  @dirrm libexec/emacs/20.3
--- 1382,1388 ----
  @dirrm share/emacs/20.3/etc
  @dirrm share/emacs/20.3
  @exec mkdir -p %D/share/emacs/site-lisp
! @dirrm share/emacs/site-lisp
  @dirrm share/emacs
  @dirrm libexec/emacs/20.3/${MACHINE_GNU_ARCH}--netbsd
  @dirrm libexec/emacs/20.3
>Audit-Trail:
>Unformatted: