all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: 38324@debbugs.gnu.org
Subject: bug#38324: 27.0.50; package corruption? cannot de install packages
Date: Sat, 25 Jan 2020 06:01:39 +0100	[thread overview]
Message-ID: <874kwk86z0.fsf@marxist.se> (raw)
In-Reply-To: <87wobrizae.fsf@mat.ucm.es> (Uwe Brauer's message of "Fri, 22 Nov 2019 18:41:45 +0100")

Uwe Brauer <oub@mat.ucm.es> writes:

> Steps to reproduce.
>
>     1. I start /opt/emacs27/bin/emacs -q
>
>     2. M-x package-list-packages.
>
>     3. I see   matlab-mode        20180928.1526 dependency Major mode for MATLAB(R) dot-m files
>
>     4. I type ? Because I want to understand the dependency but I
>        obtain an error (debug-on-error t) which I attach. 

(I'm only addressing everything up to step 4 below.)

matlab-mode is a dependency of the org-babel-eval-in-repl on MELPA.
So I installed the org-babel-eval-in-repl package, and tried your
recipe. And I got a backtrace on current master.

But I'm getting a different backtrace than you did:

Debugger entered--Lisp error: (file-missing "Opening input file" "No such file or directory" "/home/skangas/.emacs.d/elpa/matlab-mode-20200106.2...")
  insert-file-contents("/home/skangas/.emacs.d/elpa/matlab-mode-20200106.2217/matlab-mode.el")
  lm-commentary("/home/skangas/.emacs.d/elpa/matlab-mode-20200106.2217/matlab-mode.el")
  package--get-description(#s(package-desc :name matlab-mode :version (20200106 2217) :summary "Major mode for MATLAB(R) dot-m files" :reqs nil :kind nil :archive nil :dir "/home/skangas/.emacs.d/elpa/matlab-mode-20200106.2..." :extras ((:keywords "matlab" "programming" "language" "(X)emacs") (:url . "http://sourceforge.net/projects/matlab-emacs/")) :signed nil))
  describe-package-1(#s(package-desc :name matlab-mode :version (20200106 2217) :summary "Major mode for MATLAB(R) dot-m files" :reqs nil :kind nil :archive nil :dir "/home/skangas/.emacs.d/elpa/matlab-mode-20200106.2..." :extras ((:keywords "matlab" "programming" "language" "(X)emacs") (:url . "http://sourceforge.net/projects/matlab-emacs/")) :signed nil))
  describe-package(#s(package-desc :name matlab-mode :version (20200106 2217) :summary "Major mode for MATLAB(R) dot-m files" :reqs nil :kind nil :archive nil :dir "/home/skangas/.emacs.d/elpa/matlab-mode-20200106.2..." :extras ((:keywords "matlab" "programming" "language" "(X)emacs") (:url . "http://sourceforge.net/projects/matlab-emacs/")) :signed nil))
  package-menu-describe-package()
  funcall-interactively(package-menu-describe-package)
  call-interactively(package-menu-describe-package nil nil)
  command-execute(package-menu-describe-package)

Now, the above happens because, when there is no README file,
`package--get-description' expects there to be a (format "%s.el"
package-name) file where we can read the information for installed
packages.

But that's not a convention that the "matlab-mode" package follows for
some reason.  (This requirement/convention does not seem to be
documented in the manual; see (info "(elisp)Multi-file Packages").)

Maybe we need to think a bit about what we can do in these cases.  For
example, there is a matlab.el file that we could have been using
instead.  But the question is if we want to start adding heuristics
here, and if so, which.

Or should we just document the requirement and tell package authors
that they just have to follow it?  Does anyone else have an opinion
here?

   (NOTE: There is a README.org in the matlab-mode git repository[1]
   but it is not included in the MELPA package.  That should probably
   be fixed, presumably by updating the MELPA recipe.)

---

That said, I don't think I understand the below backtrace:

> Debugger entered--Lisp error: (wrong-type-argument char-or-stri3ng-p nil)
>   describe-package-1(#s(package-desc :name matlab-mode :version (20180928 1526) :summary "Major mode for MATLAB(R) dot-m files" :reqs nil :kind nil :archive nil :dir "/home/oub/.emacs.d/elpa/matlab-mode-20180928.1526" :extras ((:keywords "matlab" "programming" "language" "(X)emacs") (:url . "http://sourceforge.net/projects/matlab-emacs/")) :signed nil))
>   describe-package(#s(package-desc :name matlab-mode :version (20180928 1526) :summary "Major mode for MATLAB(R) dot-m files" :reqs nil :kind nil :archive nil :dir "/home/oub/.emacs.d/elpa/matlab-mode-20180928.1526" :extras ((:keywords "matlab" "programming" "language" "(X)emacs") (:url . "http://sourceforge.net/projects/matlab-emacs/")) :signed nil))
>   package-menu-describe-package()
>   funcall-interactively(package-menu-describe-package)
>   call-interactively(package-menu-describe-package nil nil)
>   command-execute(package-menu-describe-package)

Maybe it's just too late for me, and I'm missing something obvious
here... but where does the wrong-type-argument come from?

describe-package-1 has only one argument, and that is the
package-desc.  Cleaning up the package-desc you have, it is basically:

(package-desc-create :name 'matlab-mode
                     :version '(20180928 1526)
                     :summary "Major mode for MATLAB(R) dot-m files"
                     :reqs nil
                     :kind nil
                     :archive nil
                     :dir "/home/oub/.emacs.d/elpa/matlab-mode-20180928.1526"
                     :extras '((:keywords "matlab" "programming" "language" "(X)emacs")
                               (:url . "http://sourceforge.net/projects/matlab-emacs/"))
                     :signed nil)

Which looks very standard to me...

In any case, could you please try this again on current master and see
if you are still seeing the above backtrace, or if you are now seeing
the same as me.  Thanks in advance.

Best regards,
Stefan Kangas

Footnotes:
[1]  https://git.code.sf.net/p/matlab-emacs/src





  reply	other threads:[~2020-01-25  5:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 17:41 bug#38324: 27.0.50; package corruption? cannot de install packages Uwe Brauer
2020-01-25  5:01 ` Stefan Kangas [this message]
2020-01-25 22:15   ` Uwe Brauer
2020-01-26  3:33     ` Stefan Kangas
2020-01-26  9:03       ` Uwe Brauer
2021-08-31  2:08         ` Lars Ingebrigtsen
2021-08-31  6:53           ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kwk86z0.fsf@marxist.se \
    --to=stefan@marxist.se \
    --cc=38324@debbugs.gnu.org \
    --cc=oub@mat.ucm.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.