GNU bug report logs -
#68678
29.1; package-recompile-all should skip system packages in package-directory-list
Previous Next
Reported by: Allen Li <darkfeline <at> felesatra.moe>
Date: Tue, 23 Jan 2024 23:50:02 UTC
Severity: normal
Found in version 29.1
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68678 in the body.
You can then email your comments to 68678 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68678
; Package
emacs
.
(Tue, 23 Jan 2024 23:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Allen Li <darkfeline <at> felesatra.moe>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 23 Jan 2024 23:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
package-recompile-all currently attempts to recompile all packages,
including the system packages listed in package-directory-list.
System packages are generally byte compiled as part of installation, and
are not writeable by normal users.
package-recompile-all attempts to recompile these, which will almost
certainly error out due to this.
It would be better if package-recompile-all only tries user installed
packages (in package-user-dir), which are more likely to need
recompilation. Perhaps as a prefix arg option?
In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
cairo version 1.16.0) of 2023-09-03, modified by Debian built on
kokoro-ubuntu
System Description: Debian GNU/Linux rodete
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68678
; Package
emacs
.
(Wed, 24 Jan 2024 22:18:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 68678 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Allen Li <darkfeline <at> felesatra.moe> writes:
> package-recompile-all currently attempts to recompile all packages,
> including the system packages listed in package-directory-list.
>
> System packages are generally byte compiled as part of installation, and
> are not writeable by normal users.
>
> package-recompile-all attempts to recompile these, which will almost
> certainly error out due to this.
>
> It would be better if package-recompile-all only tries user installed
> packages (in package-user-dir), which are more likely to need
> recompilation. Perhaps as a prefix arg option?
Would this patch resolve the issue for you:
[Message part 2 (text/plain, inline)]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 868373f46c2..fe7b10f569a 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2610,7 +2610,8 @@ package-recompile-all
are invalid due to changed byte-code, macros or the like."
(interactive)
(pcase-dolist (`(_ ,pkg-desc) package-alist)
- (package-recompile pkg-desc)))
+ (with-demoted-errors "Error while recompiling: %S"
+ (package-recompile pkg-desc))))
;;;###autoload
(defun package-autoremove ()
[Message part 3 (text/plain, inline)]
> In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
> cairo version 1.16.0) of 2023-09-03, modified by Debian built on
> kokoro-ubuntu
> System Description: Debian GNU/Linux rodete
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68678
; Package
emacs
.
(Thu, 25 Jan 2024 23:00:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 68678 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jan 24, 2024 at 2:17 PM Philip Kaludercic <philipk <at> posteo.net> wrote:
>
> Would this patch resolve the issue for you:
>
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index 868373f46c2..fe7b10f569a 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -2610,7 +2610,8 @@ package-recompile-all
> are invalid due to changed byte-code, macros or the like."
> (interactive)
> (pcase-dolist (`(_ ,pkg-desc) package-alist)
> - (package-recompile pkg-desc)))
> + (with-demoted-errors "Error while recompiling: %S"
> + (package-recompile pkg-desc))))
>
> ;;;###autoload
> (defun package-autoremove ()
That works for me, though it's possible that someone may want errors
recompiling user packages surfaced directly.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68678
; Package
emacs
.
(Sun, 28 Jan 2024 21:41:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 68678 <at> debbugs.gnu.org (full text, mbox):
Allen Li <darkfeline <at> felesatra.moe> writes:
> On Wed, Jan 24, 2024 at 2:17 PM Philip Kaludercic <philipk <at> posteo.net> wrote:
>>
>> Would this patch resolve the issue for you:
>>
>> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
>> index 868373f46c2..fe7b10f569a 100644
>> --- a/lisp/emacs-lisp/package.el
>> +++ b/lisp/emacs-lisp/package.el
>> @@ -2610,7 +2610,8 @@ package-recompile-all
>> are invalid due to changed byte-code, macros or the like."
>> (interactive)
>> (pcase-dolist (`(_ ,pkg-desc) package-alist)
>> - (package-recompile pkg-desc)))
>> + (with-demoted-errors "Error while recompiling: %S"
>> + (package-recompile pkg-desc))))
>>
>> ;;;###autoload
>> (defun package-autoremove ()
>
> That works for me, though it's possible that someone may want errors
> recompiling user packages surfaced directly.
That is why I used `with-demoted-errors', which propagates errors if
`debug-on-error' is non-nil. Or do you mean permanently and
specifically related to this issue, e.g. in form of a user option.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68678
; Package
emacs
.
(Fri, 02 Feb 2024 08:11:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 68678 <at> debbugs.gnu.org (full text, mbox):
On Sun, Jan 28, 2024 at 1:40 PM Philip Kaludercic <philipk <at> posteo.net> wrote:
>
> Allen Li <darkfeline <at> felesatra.moe> writes:
> >
> > That works for me, though it's possible that someone may want errors
> > recompiling user packages surfaced directly.
>
> That is why I used `with-demoted-errors', which propagates errors if
> `debug-on-error' is non-nil. Or do you mean permanently and
> specifically related to this issue, e.g. in form of a user option.
My bad, yes, `with-demoted-errors' sounds fine to me. At the risk of
repeating myself,
I don't have a use case for surfacing the errors, but I think some
other users might.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68678
; Package
emacs
.
(Tue, 06 Feb 2024 19:14:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 68678 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Allen Li <darkfeline <at> felesatra.moe> writes:
> On Sun, Jan 28, 2024 at 1:40 PM Philip Kaludercic <philipk <at> posteo.net>
> wrote:
>>
>> Allen Li <darkfeline <at> felesatra.moe> writes:
>> >
>> > That works for me, though it's possible that someone may want errors
>> > recompiling user packages surfaced directly.
>>
>> That is why I used `with-demoted-errors', which propagates errors if
>> `debug-on-error' is non-nil. Or do you mean permanently and
>> specifically related to this issue, e.g. in form of a user option.
>
> My bad, yes, `with-demoted-errors' sounds fine to me. At the risk of
> repeating myself,
> I don't have a use case for surfacing the errors, but I think some
> other users might.
OK, then this is the patch I propse:
[0001-Tolerate-errors-while-recompiling-all-packages.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
Any objections?
Reply sent
to
Philip Kaludercic <philipk <at> posteo.net>
:
You have taken responsibility.
(Sun, 11 Feb 2024 21:54:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Allen Li <darkfeline <at> felesatra.moe>
:
bug acknowledged by developer.
(Sun, 11 Feb 2024 21:54:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 68678-done <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Allen Li <darkfeline <at> felesatra.moe> writes:
>
>> On Sun, Jan 28, 2024 at 1:40 PM Philip Kaludercic <philipk <at> posteo.net>
>> wrote:
>>>
>>> Allen Li <darkfeline <at> felesatra.moe> writes:
>>> >
>>> > That works for me, though it's possible that someone may want errors
>>> > recompiling user packages surfaced directly.
>>>
>>> That is why I used `with-demoted-errors', which propagates errors if
>>> `debug-on-error' is non-nil. Or do you mean permanently and
>>> specifically related to this issue, e.g. in form of a user option.
>>
>> My bad, yes, `with-demoted-errors' sounds fine to me. At the risk of
>> repeating myself,
>> I don't have a use case for surfacing the errors, but I think some
>> other users might.
>
> OK, then this is the patch I propse:
>
>
>
> Any objections?
As there haven't been any comment, I have pushed the patch to master. Thanks!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 11 Mar 2024 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.