From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: Updating Elisp files while Emacs is running Date: Mon, 14 Mar 2016 14:48:17 +0000 Message-ID: <87k2l5w1xq.fsf@russet.org.uk> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457966931 20670 80.91.229.3 (14 Mar 2016 14:48:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2016 14:48:51 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 14 15:48:39 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1afTnR-0002gb-WA for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2016 15:48:38 +0100 Original-Received: from localhost ([::1]:41457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTnR-0003sa-Io for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Mar 2016 10:48:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTnE-0003sK-ON for help-gnu-emacs@gnu.org; Mon, 14 Mar 2016 10:48:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afTnA-0004et-LN for help-gnu-emacs@gnu.org; Mon, 14 Mar 2016 10:48:24 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:37993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afTnA-0004em-B0 for help-gnu-emacs@gnu.org; Mon, 14 Mar 2016 10:48:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=bnZxbLm5FixCvPgBYbglebpD0PD8c7OYClGTnmgEWlU=; b=lnhwwQDK1NrvKAWiywVXK/WWiQ PwxGkkPWNJ2tMr56bUbI0y8MwcTyNXzwfhoDFMdN3XCDVOdq1kGRwifbZMYMJ18GL9sFLH4bVqZHt DUvUjzoHFN7cMY6paVGG9Z7P7vXjE1dY22PCcvR22yQKaqg+9TZuGw3+c3wy4oAEtjWFgCWr5Yyuv alMLiObskYTFNVIfBNiKXQcOcEkxsJWj/KiwvZPUSWhqb+u3JuWeNK/Y28p3ZxVw8stlV4me4JXpy p7ZCrmEfDWEGj9+sNowUSZ0swppYm19B2+Qdz4UBnX0y3dsx9LaFqiTtwAoIMCqM8axFnkMBoxzte ns9kSf8A==; Original-Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:59933 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1afTn9-000Rkb-6c; Mon, 14 Mar 2016 14:48:19 +0000 In-Reply-To: (Philipp Stephani's message of "Mon, 14 Mar 2016 13:41:17 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109570 Archived-At: Philipp Stephani writes: > OS-level package managers such as Debian's dpkg generally replace files > unconditionally when upgrading. Typically this is not a problem because > running binaries will continue to use the in-memory image, and daemons can > get restarted or sent a signal without user interaction. However, for Emacs > the situation seems different: Emacs not only needs its (dumped) binary, > but also relies on Elisp files. For Elisp files already loaded when the > upgrade is running this typically doesn't cause problems, but when Elisp > files aren't already loaded, replacing them causes problems because the > directories containing them are versioned (see e.g. lispdir in configure.ac), > so that when the version changes (even for minor changes, such as updating > from the recent pretest-1 to pretest-2), the files are no longer at the > expected location, and libraries can't be loaded any more, either manually > or via autoloads. Similar things happen for system-wide ELPA packages (in > the package-directory-list directories), because the names of these > directories are also versioned. How could this be changed so that > unattended upgrades changing the Emacs version are possible while Emacs is > running? Could the Elisp file directories get names that don't include the > version number (maybe hidden behind a configure option)? Is it possible to > install system-wide ELPA packages into directories that don't contain > version numbers? Or is there another way, e.g. using a signal to > reinitialize the load-path and the package system? I'm aware these > suggestions would still cause issues if e.g. Elisp files get moved around > or the byte code format changes, but that seems to be comparatively rare. I am not sure I see the issue. When updates to the core occur, then the version number changes, so new files will not overwrite existing ones, nor will the load-path be changed. Likewise, for ELPA, as far as I know -- the load-path is set once during package-initialize, so if a new version of a package gets added, Emacs will run with the old. If you want an existing Emacs to move to the new packages, that would be hard to get right; only a restart is going to make sense here. Why is that a problem?