[Top][All Lists]

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

master 6297eb0: Don't refuse to install packages without a "footer line"

From: Stefan Kangas
Subject: master 6297eb0: Don't refuse to install packages without a "footer line"
Date: Fri, 1 Nov 2019 20:30:44 -0400 (EDT)

branch: master
commit 6297eb0fca9967649bcde6fd160bb6b5d3ce6878
Author: Stefan Kangas <address@hidden>
Commit: Stefan Kangas <address@hidden>

    Don't refuse to install packages without a "footer line"
    * lisp/emacs-lisp/package.el (package-buffer-info): Don't signal an
    error when the "footer line" is missing.  Warn only.  (Bug#26490)
    * etc/NEWS: Announce it.
 etc/NEWS                   | 14 ++++++++++++++
 lisp/emacs-lisp/package.el |  9 ++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 7a76d90..e614197 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1075,6 +1075,20 @@ it can't find the config file.
 ** Package
+*** Warn if "footer line" is missing, but still install package.
+package.el used to refuse to install a package without the so-called
+"footer line", which appears at the very end of the file:
+;;; FILENAME ends here
+package.el will now install packages without this line, but it will
+issue a warning.  To avoid this warning, packages should keep the
+"footer line".
+Note that versions of Emacs older than 27.1 will not only refuse to
+install packages without such a line -- they will be unable to parse
+package data.  It is therefore recommended to keep this line.
 *** Change of 'package-check-signature' for packages with multiple sigs
 In previous Emacsen, 't' checked that all signatures are valid.
 Now 't' only checks that at least one signature is valid and the new 'all'
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 645e831..8c8e86a 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1082,10 +1082,13 @@ boundaries."
   (let ((file-name (match-string-no-properties 1))
         (desc      (match-string-no-properties 2))
         (start     (line-beginning-position)))
-    ;; The terminating comment format could be extended to accept a
-    ;; generic string that is not in English.
+    ;; This warning was added in Emacs 27.1, and should be removed at
+    ;; the earliest in version 31.1.  The idea is to phase out the
+    ;; requirement for a "footer line" without unduly impacting users
+    ;; on earlier Emacs versions.  See Bug#26490 for more details.
     (unless (search-forward (concat ";;; " file-name ".el ends here"))
-      (error "Package lacks a terminating comment"))
+      (lwarn '(package package-format) :warning
+             "Package lacks a terminating comment"))
     ;; Try to include a trailing newline.
     (narrow-to-region start (point))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]