GNU bug report logs - #59684
29.0.50; [PATCH] package.el: Insert news for installed packages only

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Tue, 29 Nov 2022 16:55:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Subject: bug#59684: closed (Re: bug#59684: 29.0.50; [PATCH] package.el:
 Insert news for installed packages only)
Date: Wed, 30 Nov 2022 19:55:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#59684: 29.0.50; [PATCH] package.el: Insert news for installed packages only

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 59684 <at> debbugs.gnu.org.

-- 
59684: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59684
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Philip Kaludercic <philipk <at> posteo.net>
To: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Cc: 59684-done <at> debbugs.gnu.org
Subject: Re: bug#59684: 29.0.50; [PATCH] package.el: Insert news for
 installed packages only
Date: Wed, 30 Nov 2022 19:53:54 +0000
Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:

> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>>>>> +                          ((file-regular-p file)))
>>>>
>>>> Shouldn't we keep `file-readable-p'?
>>>
>>> I think we should use `file-regular-p' so even if the pkg-dir will
>>> contain directory named "news" we will not try to insert it with
>>> `insert-file-contents'.
>>
>> I agree that `file-regular-p' is sensible, what I meant was using
>> `file-readable-p' in addition to that.  But I guess that all in all,
>> this is a rare circumstance...
>
> Oh, right.  Makes sense.  I've updated the patch.

Thanks, I've pushed the change.

[Message part 3 (message/rfc822, inline)]
From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Philip Kaludercic <philipk <at> posteo.net>
Subject: 29.0.50; [PATCH] package.el: Insert news for installed packages only
Date: Tue, 29 Nov 2022 18:54:44 +0200
[Message part 4 (text/plain, inline)]
Hi,

In some folder, e.g. "/tmp":
1. Create folder named "news"
2. emacs -Q
3. M-x list-packages
4. RET on any available not installed package

This will produce "Read error: Is a directory, /tmp/news" message.

In GNU Emacs 29.0.50
Repository revision: 2772ebe3667f28cefd0d6134204ce6a3c7a8c323
Repository branch: master

Adding news to package description was introuced in
dd98fedd0c7f27bfba046d761042c19181cb461d

Adding Philip to Cc as the author of the original commit.

Attached patch solves issue by checking that:
1. pkg-dir is not nil
2. pkg-dir is not 'builtin
3. "news" is a regular file

[0001-Insert-news-for-installed-packages-only.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.