GNU bug report logs -
#79411
31.0.50; describe-package does not show :readme after package installation, but sth else
Previous Next
Full log
Message #26 received at 79411 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stephen Leake <stephen_leake <at> stephe-leake.org> writes:
> Philip Kaludercic <philipk <at> posteo.net> writes:
>
>>> Well, and Emacs did exactly that already until commit
>>> d4fb2690702fbd348977fc94a9f7a99c00cc3010 removed it. Does anybody have
>>> an idea as to why that was removed? (CCing Stephen, the author of that
>>> commit.) The commit message does not quote a bug number, and the only
>>> bug I have found that might be related to this issue is bug#39609, which
>>> seems to be a duplicate of this one.
>>
>> On a quick glance, I cannot see the reason either. But it seems like
>> the reasonable approach, and I don't see a reason why we shouldn't be
>> able to revert that part of the commit.
>
> I don't really remember, but I think the problem was there were old
> readme's hanging around, and the local file was prefered over network
> access, so when you asked for the readme for a package, you got the
> wrong one.
>
> If you can _guarrantee_ that the file is deleted when it's old, that
> would be ok. But that's pretty hard to do.
In my previous message I suggested something like:
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ba9999c20e6..b9e2eb96389 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2162,7 +2162,15 @@ package-install-from-archive
;; Update the new (activated) pkg-desc as well.
(when-let* ((pkg-descs (cdr (assq (package-desc-name pkg-desc)
package-alist))))
- (setf (package-desc-signed (car pkg-descs)) t))))))))))
+ (setf (package-desc-signed (car pkg-descs)) t)))))))
+ ;; fetch a backup of the readme file from the server
+ (let ((readme (expand-file-name "README-elpa" (package-desc-dir pkg-desc))))
+ (unless (file-readable-p readme)
+ (package--with-response-buffer (package-archive-base pkg-desc)
+ :file (format "%s-readme.txt" (package-desc-name pkg-desc))
+ :noerror t
+ (write-region nil nil readme)))))))
+
;;;###autoload
(defun package-installed-p (package &optional min-version)
[Message part 3 (text/plain, inline)]
As we store the README file inside the package directory, it should also
be deleted when we delete the package -- unless I am missing something?
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.