From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#73102: 29.4; `package-recompile-all' should skip packages installed by distro package manager Date: Tue, 10 Sep 2024 14:59:01 +0000 Message-ID: <87ldzzlfm2.fsf@posteo.net> References: <87bk0z37qf.fsf@localhost> <87tteqe89w.fsf@posteo.net> <87wmjjd0cw.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29539"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73102-done@debbugs.gnu.org To: Zhengyi Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 10 17:00:32 2024 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 1so2M3-0007Ua-Ln for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Sep 2024 17:00:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so2LZ-0005fa-FV; Tue, 10 Sep 2024 11:00:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so2LV-0005aF-VL for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 10:59:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so2LV-0004He-MH for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 10:59:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=wWg9frrlELnugsjO5VSeC1KGzy/+Kt8NEY0lnvHSQyA=; b=EWQjbc9cIVdgjdkzLNoX0014hiHXmr+Wopiws2/odbprYx+ZSqwqzCrkALMcrLi0i+u2ASxyOtbR3vwugCVeVlc43OzV+i94/6sZKVQAeUHXT2EXighiD4P14v99r6BcDIzhnP7PabtoxLj/5/FQkXWDztygE0JIhnT0Ie72o91cGWlxH7JKc0T08j/mrqpZjHfUwrP8MHgugZfzcBJE3tRVdjv4Hqd1oe2JndXqJmiuytnd+BBuw+0pkfgbbVfzQNAfeEcMeCoxNx/x7xBeg+0hiwwzRd/Et/HtvgD2Ml3XXwCH1c3DhH2vZKohmr/k+PmZp+tCjfm/jm9zTtALfg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1so2La-0000Gv-D1 for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2024 11:00:02 -0400 Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Sep 2024 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 73102 X-GNU-PR-Package: emacs Mail-Followup-To: 73102@debbugs.gnu.org, philipk@posteo.net, i@fuzy.me Original-Received: via spool by 73102-done@debbugs.gnu.org id=D73102.1725980357941 (code D ref 73102); Tue, 10 Sep 2024 15:00:02 +0000 Original-Received: (at 73102-done) by debbugs.gnu.org; 10 Sep 2024 14:59:17 +0000 Original-Received: from localhost ([127.0.0.1]:36621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1so2Kr-0000F6-F9 for submit@debbugs.gnu.org; Tue, 10 Sep 2024 10:59:17 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:49433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1so2Kp-0000Es-6q for 73102-done@debbugs.gnu.org; Tue, 10 Sep 2024 10:59:16 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7A0D8240027 for <73102-done@debbugs.gnu.org>; Tue, 10 Sep 2024 16:59:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1725980343; bh=88Be7CXsWinLEvN0jMQo9lKbLv59uAd+ba3eUZ0h4HE=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=Hgnvdf+xcEp1jZTtXBJYLKjvnWIO+JYf+AguPjATEOpZZ4HXTiD92a4tM5rmRJqx/ 5fOF9Xn8w+g9t/EB8FxFHG0+O++PtS6ETy7jXdjlEVvyoiqaTblS9sKMcDGEPPXiin 80ctMzR4wyJ7drtB7z+ONxMZLnE1JD09pIWZXWfmm/UJMIgpBKD/RdJHxKpB3IKCBC rdWzpDcB5RF3cWnTc0Nmp1Yhlslxpu6Bh9bzmcuGPUHd0jC2zCiSVYA55kMhz9xAPr Kiq/GMcimAHUolaNnhbdVqJASs5wSwSyzaRQEIvAEOHJ2pM4R2JUSUwb6jdYBPDt6N +XyTRkrHVIB6g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X36Kf5Xjvz6tsb; Tue, 10 Sep 2024 16:59:01 +0200 (CEST) In-Reply-To: <87wmjjd0cw.fsf@localhost> (Zhengyi Fu's message of "Tue, 10 Sep 2024 22:55:43 +0800") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291569 Archived-At: Zhengyi Fu writes: > Philip Kaludercic writes: > >> Zhengyi Fu writes: >> >>> When I try recompiling all packages installed by package.el with `M-x >>> package-recompile-all', I got the following error: >>> >>> Debugger entered--Lisp error: (permission-denied "Removing old name" >>> "Permission denied" >>> "/usr/share/emacs/site-lisp/elpa/mu4e-1.10.8/mu4e-a...") >>> package-recompile(#s(package-desc :name mu4e :version (1 10 8) >>> :summary "the mu mail user agent" :reqs nil :kind nil :archive nil >>> :dir "/usr/share/emacs/site-lisp/elpa/mu4e-1.10.8" :extras nil >>> :signed nil)) >>> package-recompile-all() >>> funcall-interactively(package-recompile-all) >>> command-execute(package-recompile-all record) >>> execute-extended-command(nil "package-recompile-all" "recom all") >>> funcall-interactively(execute-extended-command nil "package-recompile-all" "recom all") >>> command-execute(execute-extended-command) >>> >>> This is possibly because the package `mu4e' was installed by the distro >>> package manager in a path where normal users don't have write access. >>> >>> I think `package-recompile-all' should either skip those packages that >>> are not installed by package.el or ignore such errors and continue to >>> recompile other packages. >> >> We have installed a patch in Bug#68678 on master (the commit is from >> last February, so you wouldn't see it yet on 29.4) that wraps the >> `package-recompile' call in a `with-demoted-errors' block. That would >> still emit a error message, but it wouldn't break the recompilation >> procedure. Do you think that is enough, or should be explicitly and >> additionally avoid re-compiling external packages? > > Yes. That patch is enough for me. Thanks!! Great, I'll close this report then. If you haven't fixed the issue locally yet: Until you upgrade, a simple fix would be to add some advice around package-recompile that wraps it in a `with-demoted-errors' block. -- Philip Kaludercic on siskin