First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 158891
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: GNU Emacs Team <emacs@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Timothy Stotts <devel@tstotts.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
70svn-gentoo.el Proposed new 70svn-gentoo.el text/plain Ulrich Müller 2007-02-24 01:36 0000 210 bytes Details
diff Proposed patch for subversion-1.4.3.ebuild patch Ulrich Müller 2007-02-24 01:38 0000 579 bytes Details | Diff
diff Proposed patch for subversion-1.4.3.ebuild (take 2) patch Ulrich Müller 2007-02-24 07:40 0000 633 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 158891 depends on: Show dependency tree
Bug 158891 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-23 00:43 0000
When installing the dev-util/subversion package, Portage generates an auto-load
lisp file under /usr/share/emacs/site-lisp/ .

On my machine, the file is:
    /usr/share/emacs/site-lisp/70svn-gentoo.el

Two libraries are prepended to the *front* of the site-wide emacs library path.
This means that the emacs libraries in the subversion ebuild is load instead of
those included in the emacs installation.

This behavior is wrong. The two libraries are:
    vc-svn
    psvn

The library psvn is not included with Emacs, and so the library path order is
irrelevant. No other ebuild contains it (to my knowledge).

However, the library vc-svn included with subversion is a deprecated library.
In the comments of the library file, it says that it should not be loaded if
your Emacs comes with vc-svn as it is old and obsolete.

Currently the following conflict exists between app-editors/emacs (or -cvs) and
dev-util/subversion:

If the installed Emacs version contains vc-svn, it will be ignored in favor of
the old and obsolete library. This causes grief and bugs for the user.

The generated autoload could be changed from:

   (setq load-path (cons "/usr/share/emacs/site-lisp/subversion" load-path))

to:

   (setq load-path (append load-path
'("/usr/share/emacs/site-lisp/subversion")))


But honestly, this will not solve the issue due to Emacs searching its own
libraries last.

The subversion ebuild should do one of the following:
    (1) detect whether app-editor/emacs or app-editor/emacs-cvs is the editor
installed; if emacs-cvs, do not install vc-svn.el
    (2) patch the vc-svn.el file to find and load the native vc-svn if it
exists (load-file "..."), otherwise continue loading itself.
    (3) provide a use flag to prevent install of old lisp code, perhaps use
'emacs' and 'emacs22' or 'emacs' and 'emacs-cvs' are relevant.
    (4) provide the user with a warning message on how to avoid the issue

Glad to contribute any ideas/elisp patches.

------- Comment #1 From Paul de Vrieze 2006-12-30 11:48:06 0000 -------
I'd prefer your second solution. The vc-svn.el script is a file in the tree so
any better version would do (as long as it is compatible)

------- Comment #2 From Ulrich Müller 2007-02-23 21:02:06 0000 -------
Another possibility would be to install vc-svn.el* in a different directory
(say, ${SITELISP}/${PN}/compat). Then the site-init file could add it to the
load-path for Emacs versions < 22 only:

(add-to-list 'load-path "@SITELISP@")
(and (< emacs-major-version 22)
     (add-to-list 'load-path "@SITELISP@/compat"))

------- Comment #3 From Timothy Stotts 2007-02-23 23:45:05 0000 -------
(In reply to comment #2)
That would be an excellent solution. One caveat though. Emacs 22 appears to
recursively search the site-lisp directory for elisp files; so even if the
directory is not explicitly add to `load-path', if it is under a directory in
the path, it will still be found by `locate-library'.

IMHO, a better solution would be to install `vc-svn.el' at
/usr/share/subversion/emacs/ in similar fashion to `clisp' and other portage
packages. Then site the load file can conditionally add that directory the
`load-path' base on the Emacs major version.

------- Comment #4 From Ulrich Müller 2007-02-24 01:11:38 0000 -------
(In reply to comment #3)
> One caveat though. Emacs 22 appears to recursively search the site-lisp 
> directory for elisp files; so even if the directory is not explicitly
> add to `load-path', if it is under a directory in the path, it will still
> be found by `locate-library'.

You are right, load-path is augmented by its subdirs in startup.el (function
normal-top-level-add-subdirs-to-load-path). This can be prevented by placing a
file ".nosearch" within the subdir.

So in addition to my comment #2, the ebuild should also install an empty file
".nosearch" in the "compat" directory.

------- Comment #5 From Ulrich Müller 2007-02-24 01:36:52 0000 -------
Created an attachment (id=111101) [edit]
Proposed new 70svn-gentoo.el

------- Comment #6 From Ulrich Müller 2007-02-24 01:38:23 0000 -------
Created an attachment (id=111102) [edit]
Proposed patch for subversion-1.4.3.ebuild

------- Comment #7 From Ulrich Müller 2007-02-24 07:40:53 0000 -------
Created an attachment (id=111111) [edit]
Proposed patch for subversion-1.4.3.ebuild (take 2)

------- Comment #8 From Paul de Vrieze 2007-02-24 18:32:20 0000 -------
What is the say of the emacs maintainers on this? It seems to be a sane
solution, but I'd like your view on it.

------- Comment #9 From Christian Faulhammer 2007-02-25 11:30:14 0000 -------
(In reply to comment #8)
> What is the say of the emacs maintainers on this? It seems to be a sane
> solution, but I'd like your view on it.

 Ulrich is an Officially Trusted Emacs User(TM).  :)  But I am ok with it,
looks fine.  Thanks Ulrich, as always.

------- Comment #10 From Ulrich Müller 2007-03-02 20:28:54 0000 -------
While you are at it:
Is there a special reason why pkg_postrm() does:
    has_version virtual/emacs && elisp-site-regen
instead of:
    use emacs && elisp-site-regen
which is used in pkg_postinst() (and is the more usual way)?

------- Comment #11 From Christian Faulhammer 2007-03-07 04:46:48 0000 -------
(In reply to comment #10)
> While you are at it:
> Is there a special reason why pkg_postrm() does:
>     has_version virtual/emacs && elisp-site-regen
> instead of:
>     use emacs && elisp-site-regen
> which is used in pkg_postinst() (and is the more usual way)?

 I fixed that, pauldv, I hope you don't mind.  The rest has been already
handled, so this bug can be closed.

------- Comment #12 From Ulrich Müller 2007-07-15 17:32:54 0000 -------
Both problems (comment #7 and comment #10) reappeared in 1.4.4-r2, therefore
reopening.

Versions 1.4.3 up to 1.4.4-r1 were O.K.

------- Comment #13 From Ulrich Müller 2007-07-15 17:34:46 0000 -------
*** Bug 185427 has been marked as a duplicate of this bug. ***

------- Comment #14 From Ulrich Müller 2007-07-15 18:18:29 0000 -------
Fixed again in 1.4.4-r3, as discussed with phreak on IRC.

First Last Prev Next    No search results available      Search page      Enter new bug