From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#22817: 25.0.91; [PATCH] Include versioned preloaded libraries in `package--builtin-versions' Date: Tue, 12 Jul 2016 09:19:50 -0400 Message-ID: References: <86r3fzy7ea.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468329689 27460 80.91.229.3 (12 Jul 2016 13:21:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2016 13:21:29 +0000 (UTC) Cc: 22817@debbugs.gnu.org To: Chris Feng Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 12 15:21:18 2016 Return-path: Envelope-to: geb-bug-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 1bMxce-0004yW-Hq for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jul 2016 15:21:12 +0200 Original-Received: from localhost ([::1]:40471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMxcd-0001dk-PR for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jul 2016 09:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMxcX-0001dT-6K for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 09:21:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMxcT-0002aq-VY for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 09:21:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMxcT-0002am-S8 for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 09:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMxcT-00036k-KU for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 09:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2016 13:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22817-submit@debbugs.gnu.org id=B22817.146832960811869 (code B ref 22817); Tue, 12 Jul 2016 13:21:01 +0000 Original-Received: (at 22817) by debbugs.gnu.org; 12 Jul 2016 13:20:08 +0000 Original-Received: from localhost ([127.0.0.1]:47749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMxbW-00035H-N3 for submit@debbugs.gnu.org; Tue, 12 Jul 2016 09:20:08 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:29638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMxbQ-00034f-3p for 22817@debbugs.gnu.org; Tue, 12 Jul 2016 09:20:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CvCwA731xV/3mcpUVcgxCEAsEMCYR+gk0EAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQHCxQYDSSINwjPIwEBAQEBBQEBAQEeizqFBQeELQWZbgWFJJIUghSBRSNhgVqBWSKCeAEBAQ X-IPAS-Result: A0CvCwA731xV/3mcpUVcgxCEAsEMCYR+gk0EAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQHCxQYDSSINwjPIwEBAQEBBQEBAQEeizqFBQeELQWZbgWFJJIUghSBRSNhgVqBWSKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="247574673" Original-Received: from 69-165-156-121.dsl.teksavvy.com (HELO pastel.home) ([69.165.156.121]) by ironport2-out.teksavvy.com with ESMTP; 12 Jul 2016 09:19:50 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8584864C36; Tue, 12 Jul 2016 09:19:50 -0400 (EDT) In-Reply-To: (Chris Feng's message of "Sat, 27 Feb 2016 09:24:32 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120904 Archived-At: > Also, since `package--builtin-versions' is now complete, should we remove the > version info in `package--builtins'? Not sure what you mean nor what would be the benefit. > I forgot to mention that the bug can be reproduced by installing a > package having a preloaded lib as a dependency, e.g.: > > M-x package-install RET xelb RET > > Then cl-generic 0.2 will get installed. A more direct way is to check (assq 'cl-generic package--builtin-versions) which should not return nil (but does :-( ). I haven't looked in detail at your patch, but it'd be good to do something along these lines. It's probably too late to use your approach for emacs-25, but I think we need to install some fix for this problem in emacs-25, since otherwise Emacs-25.1 will end up insisting on installing cl-generic from GNU ELPA every occasion it gets. How 'bout you install your patch into master and we install the patch below into emacs-25? Stefan diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 37edf45..e5bab8d 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -86,6 +86,11 @@ ;;; Code: +;; The autoloads.el mechanism which adds package--builtin-versions +;; maintenance to loaddefs.el doesn't work for preloaded packages (such +;; as this one), so we have to do it by hand! +(push (purecopy '(cl-generic 1 0)) package--builtin-versions) + ;; Note: For generic functions that dispatch on several arguments (i.e. those ;; which use the multiple-dispatch feature), we always use the same "tagcodes" ;; and the same set of arguments on which to dispatch. This works, but is