From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#41489: `package-dir-info' fails on a directory with a non-saved file Date: Mon, 25 May 2020 19:07:38 -0700 Message-ID: References: <83wo52y0h8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="44400"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41489@debbugs.gnu.org To: Paul Pogonyshev , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 26 04:08:41 2020 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 1jdP1E-000BRj-UG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 May 2020 04:08:40 +0200 Original-Received: from localhost ([::1]:35278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdP1E-00017S-12 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 May 2020 22:08:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdP0c-0000Vh-IH for bug-gnu-emacs@gnu.org; Mon, 25 May 2020 22:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdP0c-0002Of-8b for bug-gnu-emacs@gnu.org; Mon, 25 May 2020 22:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdP0c-00027D-4E for bug-gnu-emacs@gnu.org; Mon, 25 May 2020 22:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 May 2020 02:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41489 X-GNU-PR-Package: emacs Original-Received: via spool by 41489-submit@debbugs.gnu.org id=B41489.15904588668104 (code B ref 41489); Tue, 26 May 2020 02:08:02 +0000 Original-Received: (at 41489) by debbugs.gnu.org; 26 May 2020 02:07:46 +0000 Original-Received: from localhost ([127.0.0.1]:43085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdP0M-00026e-HX for submit@debbugs.gnu.org; Mon, 25 May 2020 22:07:46 -0400 Original-Received: from mail-yb1-f193.google.com ([209.85.219.193]:34991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdP0K-00026K-Jk for 41489@debbugs.gnu.org; Mon, 25 May 2020 22:07:45 -0400 Original-Received: by mail-yb1-f193.google.com with SMTP id u73so6679922ybi.2 for <41489@debbugs.gnu.org>; Mon, 25 May 2020 19:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=EC+VPTg88Lwnwybhp9CRt3XfspbuUHG+yRGxJIKXZPo=; b=nMSYEimm/CBmu9uG0xMIOoU/xLYqp2JgqFwwTKHBsUiBrE86lPmoRPogeKTqDY29yI ihYohON/5PNQZN/IhrqO+BFgi+FVdBdlg/2DPJ4ORxJkkUK7TQk2Y2i+Dsbpf5iMFtl4 QmkM/h8/NPjzE45D8RgpJ3UGnPQ0Ul2zDw2kHL7Z4QPi2dK0Y33PD9tHiKfNHltw4Svz iu378TT/BcsZc19ykIsxzSRuXvWHmHnHTbgNy2PBSvhy2VoAZsBs4cxJ2aAJ3gVXRTVU pmszT1efP05HK/q1XblBgUAv1aj+G0lj1bEBZErbGOuKfZzB68zFLihdzo1dVngNyX2i vGsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=EC+VPTg88Lwnwybhp9CRt3XfspbuUHG+yRGxJIKXZPo=; b=hkyQ/7nUC08oGhtaMXA/+bh8cHAxApackE6Qe1l+UtKOP+jUGRVN10yR9QF8yTBJyn cPkzJCUh5uowaZ5v+W7NNqiqJBo2WfHpkxEZNmOc9H7Nw8i3b+LtU/57zpvufX/TqW87 Zq1zmrp6lm4xqMub/+QIWVSKl0h2VKGHkaTVYqtwIcPc7xuF6g50jfN0y3mh9s7zoUQz GPPcP6JrAGUtNNeBTGVSDXgv+O/uW7Pl7hRCwPEOzevldHClZAyoIrNypieF6rdHmH0q g5Q8xvej64abd2G4wsrvx/9xliZ/G/ZCb/Xkm1ebB8uMUNWWnOj/W37gNK4gjf3CsVls yGnA== X-Gm-Message-State: AOAM530hf4TiZorZmNciHco4ESUsbWISdDqEveHNe1Hiz6FkXjIaiEwO j52/OJN4wHr+QJKN83U1xkgRx6azN87YPMd2qnA= X-Google-Smtp-Source: ABdhPJwlQaa1stpM4cCWrGCdB5idUWosdIwUPknwvXl6tsWMHdH8KLUscTqdT0WcYCVzWETuDVajM3rrudy1qiLWMUI= X-Received: by 2002:a25:41cd:: with SMTP id o196mr47693683yba.181.1590458859061; Mon, 25 May 2020 19:07:39 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 25 May 2020 19:07:38 -0700 In-Reply-To: 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" Xref: news.gmane.io gmane.emacs.bugs:181012 Archived-At: Paul Pogonyshev writes: > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 9a6d1d7319..99ba5d7107 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -1181,7 +1181,9 @@ package-dir-info > info) > (while files > (with-temp-buffer > - (insert-file-contents (pop files)) > + ;; Skip unreadable files, e.g. locks for unsaved `.el' > + ;; buffers (bug#41489). > + (ignore-errors (insert-file-contents (pop files))) > ;; When we find the file with the data, > (when (setq info (ignore-errors (package-buffer-info))) > ;; stop looping, Do we really want to ignore *any* error from insert-file-contents here? Should we really run package-buffer-info if inserting the file fails? Won't that reach (error "Package lacks a file header") and signal an error anyways, just a different and more cryptic one? Best regards, Stefan Kangas