From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#75065: Upon archive download failure print the original error Date: Tue, 24 Dec 2024 18:25:30 +0300 Message-ID: <4361fa59c17dc06b285fea25f025a9e86f81d1fe.camel@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-JjJpO7rp5UbVLAfyyvCc" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34974"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.54.2 To: 75065@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 24 16:26:22 2024 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 1tQ6ne-0008vV-6o for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Dec 2024 16:26:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQ6nW-0003bH-Vg; Tue, 24 Dec 2024 10:26:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ6nM-0003Z7-DO for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:26:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQ6nK-00052j-Gk for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:26:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=4Ikg26riyP0be7VacDU1R5LcAlMyf9cLwZ87NZtRyfc=; b=ld1ZuvoacB3hsBOn/QspCm8Xl4cjmh/2bPPQrl75nrYor6TaP6FaZYCKPzW33Lm2hF0UhMv9s8rmBZ5341kdrwBtWriJPZ7s/GW40+D/FQAvop6XL/XpoeNHaI7BJlD+9sPDQoC2DUJ2ZypYaDBoXhfZ8CmJW1LLWUAA/okJhYVZwTGQmcJ4aazTnm3UIH5/aAPAMnN6RdE9ckCjiWVrxbsBc0JruBwty7VC9KyUe7v6ih2JPUY6rE4gqIKXlTSMMkpV9QHNnZAXT+qsGCIcgi6Z+OqRNopJAMl1gkWbZOsQhTnw+3gIWgHbZRHViCchl5g5UlCdYQt3nvzvt1l1cA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQ6nK-0006so-1S for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Dec 2024 15:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75065 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173505394626430 (code B ref -1); Tue, 24 Dec 2024 15:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Dec 2024 15:25:46 +0000 Original-Received: from localhost ([127.0.0.1]:33462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ6n3-0006sD-VQ for submit@debbugs.gnu.org; Tue, 24 Dec 2024 10:25:46 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQ6n0-0006s4-Ie for submit@debbugs.gnu.org; Tue, 24 Dec 2024 10:25:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ6n0-0003OA-1A for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:25:42 -0500 Original-Received: from forward400a.mail.yandex.net ([178.154.239.95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQ6mw-0004yT-2f for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2024 10:25:41 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:579e:0:640:4778:0]) by forward400a.mail.yandex.net (Yandex) with ESMTPS id 48FA5646E5 for ; Tue, 24 Dec 2024 18:25:31 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id UPZvtw4OfmI0-aikTseph; Tue, 24 Dec 2024 18:25:30 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735053930; bh=4Ikg26riyP0be7VacDU1R5LcAlMyf9cLwZ87NZtRyfc=; h=Date:To:From:Subject:Message-ID; b=ZOUvfXN8+Nr/wrnGzdXv5OQufKL1ZHfuGMwxoJ80tUgaO3ZmCzpyCFpk98JgYOt1a EgE6Qx7Zr2gh+rCOQNpSSzKGpmgeNokKcrfbL8d2OVE6Krq7MA/DMnLfgBlJbD7IRv 8Q1XlQihhdKQa46rCFT4agfH25CRlGg8IIwuOB4Q= Authentication-Results: mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received-SPF: pass client-ip=178.154.239.95; envelope-from=Hi-Angel@yandex.ru; helo=forward400a.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297694 Archived-At: --=-JjJpO7rp5UbVLAfyyvCc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was recently helping out a new Emacs user with package installation=C2=B9= , and I found an interesting thing: if you put to `package-archives` a URL without `https` prefix, download will fail. Long story short, the reason turns out that `package-archives` also supports local paths, which the URL being considered as. However, Emacs never prints a message about that, even though such message exists in the code. Instead it just says that download failed, leaving a user wondering why. That happens because (package--download-and-read-archives) ignores the exception message, and always just prints generic failure message. This code fixes this, so now the actual failure message will be correctly shown. 1: https://emacs.stackexchange.com/questions/82828/is-installing-deadgrep-fron= -melpa-still-possible/82829#82829 --=-JjJpO7rp5UbVLAfyyvCc Content-Disposition: attachment;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