From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#48015: 28.0.50; ELPA package compilation fails Date: Mon, 26 Apr 2021 18:16:18 -0400 Message-ID: References: <875z0amyxo.fsf@gmx.de> <87wnsql1ih.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35711"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48015@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 00:17:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lb9XV-00099j-Gw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 00:17:13 +0200 Original-Received: from localhost ([::1]:58502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lb9XU-0001ve-4t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Apr 2021 18:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lb9XM-0001vI-Qm for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2021 18:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lb9XK-0007zy-HJ for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2021 18:17:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lb9XK-00083j-6H for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2021 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2021 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48015 X-GNU-PR-Package: emacs Original-Received: via spool by 48015-submit@debbugs.gnu.org id=B48015.161947539130938 (code B ref 48015); Mon, 26 Apr 2021 22:17:02 +0000 Original-Received: (at 48015) by debbugs.gnu.org; 26 Apr 2021 22:16:31 +0000 Original-Received: from localhost ([127.0.0.1]:47439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lb9Wo-00082w-Oh for submit@debbugs.gnu.org; Mon, 26 Apr 2021 18:16:30 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lb9Wk-00082g-I1 for 48015@debbugs.gnu.org; Mon, 26 Apr 2021 18:16:29 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 11B098043C; Mon, 26 Apr 2021 18:16:21 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 843A380342; Mon, 26 Apr 2021 18:16:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619475379; bh=9uy0ylT/3ZNnXF321Y8rH3I0K0rcvZCnSYkn1twc4DI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IkrqMqMEyMuqtauyNKg6J74G61DfC730ZsX5tNPx7j1EJbCNfxdHOwqv6Hh+Y2f8y pk4B0Y2RSqqiAUjlKqU/VXztKWXJFRNYdSIjfTFD9HY+x8gvHfyOnC0gQ+8NSYhvxp 5M41goUdh0MWHAvYcTfEqHYyW3BbrZPipi3rMyPpT55rmcgBNqFAF6oWK4/c1R3sta 3JcxgzFWo2ACnAMPmnK3HJ2s9iwSPGEOWS5TmokOiPwVTcgZSYJJ6SqF5KZmIQndTJ 6NBRGRpNQTr6/Awlp/3vaVp3JeEWYQBjrAFdlsEm7IG3CbyK4yuIWjH5svqlkdn9b1 cu42Tfwfm68Nw== Original-Received: from alfajor (unknown [157.52.10.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 55F681201B3; Mon, 26 Apr 2021 18:16:19 -0400 (EDT) In-Reply-To: <87wnsql1ih.fsf@gmx.de> (Michael Albinus's message of "Sun, 25 Apr 2021 19:25:42 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204978 Archived-At: > Same here. Hitting C-g at the password prompt is not sufficient to > trigger the error for package installation. > > Maybe you could use something else? "emacs -Q /ssh::" did the failing > test. Indeed, I can reproduce the problem now. Basically you need default-directory to be under Tramp's control. The core problem that I see is the following: - Emacs's tramp gets loaded - We go to a Tramp-controlled default-directory - We call `package--load-files-for-activation` - This starts by loading ~/.emacs.d/elpa/tramp-NN.MM/tramp-autoloads.el This calls `tramp-register-autoload-file-name-handlers`. - At this point, `package--load-files-for-activation` would like to continue by (re)loading the new Tramp files, such as `tramp-compat` and friends in the same order that they have been loaded (i.e. `tramp-compat.el` before `tramp.el`). - But before it gets a chance to do that, the file-name handlers call `tramp-autoload-file-name-handler` because of `default-directory`, which does (load "tramp" 'noerror 'nomessage), which loads the new `tramp.el` before we got a change to load the new `tramp-compat.el`, which then leads to an error when the new code in `tramp.el` calls a new function from `tramp-compat.el` (which happens to be `tramp-compat-thread-yield` AFAICT). At this point, I'm not sure how best to fix the problem. Maybe replacing (load "tramp" 'noerror 'nomessage) with (require 'tramp nil t) is all it takes. Or maybe a better option is to arrange the autoloads such that `tramp-register-autoload-file-name-handlers` doesn't "unload/unregister" file handlers that have already been loaded so that the directory that was already under Tramp's control doesn't re-trigger a call to `tramp-autoload-file-name-handler`? Stefan