Received: (at 78636) by debbugs.gnu.org; 9 Jun 2025 11:46:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 09 07:46:51 2025
Received: from localhost ([127.0.0.1]:54126 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1uOaxm-0006QO-Ii
for submit <at> debbugs.gnu.org; Mon, 09 Jun 2025 07:46:50 -0400
Received: from mout02.posteo.de ([185.67.36.66]:32905)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <philipk@HIDDEN>)
id 1uOaxj-0006Q2-05
for 78636 <at> debbugs.gnu.org; Mon, 09 Jun 2025 07:46:47 -0400
Received: from submission (posteo.de [185.67.36.169])
by mout02.posteo.de (Postfix) with ESMTPS id 96D17240101
for <78636 <at> debbugs.gnu.org>; Mon, 9 Jun 2025 13:46:40 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net;
s=1984.ea087b; t=1749469600;
bh=dr4mY5YYKXC5ZI8wfnDcNxTiUJkdXBuAuoYfopS+pfU=;
h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
Content-Type:Content-Transfer-Encoding:From;
b=D9qE1CLJLoVFZtn+1K8WcMshWbN+rgOmgGzU0GEJ4ZqqCCVDq0EJhf5B+46qZb0Rf
zf4bkLwSiBR5RXsqxPfi2Dq5z9ObElIbasMcyOLYiKP4CgyLl/SaLC79zInZsN2ZS8
eCbyJbHdfGzlCP/fNUwTeTT7ytup9DRQTi61F+KDvYfJ/0P+IsRoyb7P4ki0ycsZiz
bq8qY5+Z5zBgG/WymKWbvVgDHbycQb3e9417QGobKyUd3D8XqlxSsd+2Ce0vhaVcOr
8wck23P2UnMM5FhnVIqKU4UkR/a6sohmEY06wij5ZAtMDj/urfgyFwlvBMXFZnhwrW
d+E8M8Hwc/opWz8h7PGQBm7yDW1QnXRPGD1chS9yIUujV7i4YuyZI7JqMtzo8Vnmj9
KLHDVFnPKl2XU64UDK+Bl5QzZeG3Tm54mRD15Xw94APkLg8XFERPNxCpZN8JU3fniI
r4sDfDtQ5B8/9Z5m6VcKWU0vkhqLiY6ZD14K2jS/ZonQsg4UsCa
Received: from customer (localhost [127.0.0.1])
by submission (posteo.de) with ESMTPSA id 4bG9B73D3Lz9rxF;
Mon, 9 Jun 2025 13:46:39 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#78636: 30.1; package-install-file errors with some tar files
In-Reply-To: <86msakhr28.fsf@HIDDEN>
References: <5F11F8C9-F708-40DF-915F-91B6992802C8@HIDDEN>
<010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN>
<86msakhr28.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
z4oM
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
preference=signencrypt
Date: Mon, 09 Jun 2025 11:46:39 +0000
Message-ID: <87jz5lp274.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 78636
Cc: 78636 <at> debbugs.gnu.org, Andy Rosen <ajr@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.3 (----)
Eli Zaretskii <eliz@HIDDEN> writes:
>> Date: Thu, 29 May 2025 15:56:31 +0000
>> From: Andy Rosen via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>=20
>> Running 'package-install-file' on a tar file might throw a 'Wrong type a=
rgument: arrayp, nil' error from
>> 'tar--check-descriptor=E2=80=99. The problem comes from assumptions mad=
e by 'package--description-file' and
>> tar-mode about the filenames contained in the tar file. I=E2=80=99ve wr=
itten a detailed description of the error and
>> root cause here.
The issue make sense to me and we should fix it.
>> I propose adding a 'condition-case' to 'package-install-file' to return =
a friendly message.
>>=20
>> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
>> index 82fcf439a11..01f659e6982 100644
>> --- a/lisp/emacs-lisp/package.el
>> +++ b/lisp/emacs-lisp/package.el
>> @@ -2439,8 +2439,10 @@ directory."
>> (insert-file-contents-literally file)
>> (set-visited-file-name file)
>> (set-buffer-modified-p nil)
>> - (when (string-match "\\.tar\\'" file) (tar-mode)))
>> - (package-install-from-buffer)))
>> + (when (string-match "\\.tar\\'" file) (tar-mode)
^
Please break the line here. I initially missed the major-mode switch,
which confused me.
>> + (condition-case nil
>> + (package-install-from-buffer)
>> + (error (message "%s is not a valid package file" (file-name-nond=
irectory file))))))))
I am not sure if this is just the formatting of the patch while
responding, but the indentation here is also misleading.
Also, can't we use `tar-header-block-tokenize' or some other function to
directly check if the file is a valid archive, instead of relying on
downstream signals being raised?
>>=20=20
>> ;;;###autoload
>> (defun package-install-selected-packages (&optional noconfirm)
>>=20
>> In GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS
>> appkit-2113.65 Version 12.7.6 (Build 21H1320)) of 2025-02-24 built on
>> armbob.lan
>> Windowing system distributor 'Apple', version 10.3.2575
>> System Description: macOS 15.5
>
> Philip, any comments?
bug-gnu-emacs@HIDDEN:bug#78636; Package emacs.
Full text available.Received: (at 78636) by debbugs.gnu.org; 7 Jun 2025 08:52:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 07 04:52:24 2025 Received: from localhost ([127.0.0.1]:46857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uNpHr-0000jq-RD for submit <at> debbugs.gnu.org; Sat, 07 Jun 2025 04:52:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46880) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uNpHq-0000ja-LI for 78636 <at> debbugs.gnu.org; Sat, 07 Jun 2025 04:52:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1uNpHk-0006Ls-SU; Sat, 07 Jun 2025 04:52:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=htZJhXimXAvofKrVQUfGSlakLWuR14KHXG4UCf1jQ+Q=; b=lTf4ztvzlJlRYjqWpBLb J7dy02YrSvpLR6UtyB8bL/ZJHykerXGEqjh/HLKhSrPaHJ0Op94bushFqKKtb5X4n0PgsxTU9qqmY vk+cwGgjmnCNCdpGONYykW3FAOt2LApPuVRFRxdhvzvkfvVjI1NAGt0sOxvxDKld0Sohl8UJZ2arB Mqp/Iza/WhM3UajI71DJDZDd70851ItfrpRQ0ALpIyY/+tfablF8Nl3vXmYFwePDnAVl4H2fctBAT 7ulOB4cmp08AJjszTkNwfLSTsA3yGePv6VO2odJKTEBVQVFSQKBJVSfihgtj63M9e1z/0KZ/iMeVw /7rx/OmDUSiZPA==; Date: Sat, 07 Jun 2025 11:52:15 +0300 Message-Id: <86msakhr28.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Andy Rosen <ajr@HIDDEN>, Philip Kaludercic <philipk@HIDDEN> In-Reply-To: <010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#78636: 30.1; package-install-file errors with some tar files References: <5F11F8C9-F708-40DF-915F-91B6992802C8@HIDDEN> <010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78636 Cc: 78636 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Thu, 29 May 2025 15:56:31 +0000 > From: Andy Rosen via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Running 'package-install-file' on a tar file might throw a 'Wrong type argument: arrayp, nil' error from > 'tar--check-descriptor’. The problem comes from assumptions made by 'package--description-file' and > tar-mode about the filenames contained in the tar file. I’ve written a detailed description of the error and > root cause here. > > I propose adding a 'condition-case' to 'package-install-file' to return a friendly message. > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 82fcf439a11..01f659e6982 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -2439,8 +2439,10 @@ directory." > (insert-file-contents-literally file) > (set-visited-file-name file) > (set-buffer-modified-p nil) > - (when (string-match "\\.tar\\'" file) (tar-mode))) > - (package-install-from-buffer))) > + (when (string-match "\\.tar\\'" file) (tar-mode) > + (condition-case nil > + (package-install-from-buffer) > + (error (message "%s is not a valid package file" (file-name-nondirectory file)))))))) > > ;;;###autoload > (defun package-install-selected-packages (&optional noconfirm) > > In GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS > appkit-2113.65 Version 12.7.6 (Build 21H1320)) of 2025-02-24 built on > armbob.lan > Windowing system distributor 'Apple', version 10.3.2575 > System Description: macOS 15.5 Philip, any comments?
bug-gnu-emacs@HIDDEN:bug#78636; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 29 May 2025 20:01:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 29 16:01:32 2025
Received: from localhost ([127.0.0.1]:39419 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1uKjRT-0001eZ-0p
for submit <at> debbugs.gnu.org; Thu, 29 May 2025 16:01:32 -0400
Received: from lists.gnu.org ([2001:470:142::17]:48522)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from
<010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN>)
id 1uKfch-0002tk-Kb
for submit <at> debbugs.gnu.org; Thu, 29 May 2025 11:56:52 -0400
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
<010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN>)
id 1uKfcb-0007ex-BU
for bug-gnu-emacs@HIDDEN; Thu, 29 May 2025 11:56:45 -0400
Received: from a48-181.smtp-out.amazonses.com ([54.240.48.181])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128)
(Exim 4.90_1) (envelope-from
<010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN>)
id 1uKfcZ-0000n9-2Q
for bug-gnu-emacs@HIDDEN; Thu, 29 May 2025 11:56:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
s=gyvnu7qtvdgiyrsmcz23vnbilqvwfpd4; d=corp.mlfs.org; t=1748534192;
h=Subject:From:To:Date:Mime-Version:Content-Type:References:Message-Id;
bh=kFBLNcGYhVrVhRU3bBDJQgdqAWlvi5UOU0GznGR7Kug=;
b=Ouvp4Ry0vcLv+micZAGPV3xwgkvZur19ECDgJG/T+/mt3VE0bJjTCwouW2r057Je
VRvN1Rar2IaBfuf+MZGvI5YL05bGUoqzr+I2G7asO3ItwBRkxFd8dFjZgoTiZj4e9eZ
R3g7qGctiZ19xLoOHFSeR6ziLJA5iGAf+5a/iT0E=
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;
s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1748534192;
h=Subject:From:To:Date:Mime-Version:Content-Type:References:Message-Id:Feedback-ID;
bh=kFBLNcGYhVrVhRU3bBDJQgdqAWlvi5UOU0GznGR7Kug=;
b=FSAx9ad6VqBTSnz651pB6A1kvXe3lSaq7p/MlaJXj5+2nDNPzpi+NqQeIsKwfDjs
FqVZMKh4eRDiX7IBjXeMui1vH3QlqbFuECLxMozNUB5VJoEuJFSR9ulkZN7VTScm8GS
0Y7O+XtjW4GJNsAncmV8g5h1guwZC68dzWgnHQ8Y=
Subject: 30.1; package-install-file errors with some tar files
From: =?UTF-8?Q?Andy_Rosen?= <ajr@HIDDEN>
To: =?UTF-8?Q?bug-gnu-emacs=40gnu=2Eorg?= <bug-gnu-emacs@HIDDEN>
Date: Thu, 29 May 2025 15:56:31 +0000
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_Le8e2ihjfbmv9gwUwHKtwwxdxPtq7v39iDuO-Dt5OaHCvgsi"
References: <5F11F8C9-F708-40DF-915F-91B6992802C8@HIDDEN>
X-Priority: 3 (Normal)
X-Mailer: Amazon WorkMail
Thread-Index: AQHb0LI+w+Pax68sR1+ldcHuULn+Hw==
Thread-Topic: 30.1; package-install-file errors with some tar files
X-Original-Mailer: Apple Mail (2.3826.600.51.1.1)
X-Wm-Sent-Timestamp: 1748534190
Message-ID: <010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN>
Feedback-ID: ::1.us-east-1.LF00NED762KFuBsfzrtoqw+Brn/qlF9OYdxWukAhsl8=:AmazonSES
X-SES-Outgoing: 2025.05.29-54.240.48.181
Received-SPF: pass client-ip=54.240.48.181;
envelope-from=010001971cc2668d-0b41bbfd-dac4-42ff-bd39-aa75cb5200ab-000000@HIDDEN;
helo=a48-181.smtp-out.amazonses.com
X-Spam_score_int: -19
X-Spam_score: -2.0
X-Spam_bar: --
X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 29 May 2025 16:01:29 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)
This is a multi-part message in MIME format. Your mail reader does not
understand MIME message format.
--=_Le8e2ihjfbmv9gwUwHKtwwxdxPtq7v39iDuO-Dt5OaHCvgsi
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Running 'package-install-file' on a tar file might throw a 'Wrong type ar=
gument: arrayp, nil' error from 'tar--check-descriptor=E2=80=99. =C2=A0Th=
e problem comes from assumptions made by 'package--description-file' and =
tar-mode about the filenames contained in the tar file. =C2=A0I=E2=80=99v=
e written a detailed description of the error and root cause=C2=A0here <h=
ttps://github.com/ajrosen/bookmarks-menu/discussions/2> .
I propose adding a 'condition-case' to 'package-install-file' to return a=
friendly message.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 82fcf439a11..01f659e6982 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2439,8 +2439,10 @@ directory."
=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert-file-contents-literally file)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(set-visited-file-name file)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(set-buffer-modified-p nil)
- =C2=A0 =C2=A0 =C2=A0(when (string-match "\\.tar\\'" file) (tar-mode)))
=
- =C2=A0 =C2=A0(package-install-from-buffer)))
+ =C2=A0 =C2=A0 =C2=A0(when (string-match "\\.tar\\'" file) (tar-mode)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(condition-case nil
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(package-install=
-from-buffer)
+=C2=A0=C2=A0 =C2=A0 =C2=A0(error (message "%s is not a valid package fil=
e" (file-name-nondirectory file))))))))
=C2=A0=C2=A0;;;###autoload
=C2=A0(defun package-install-selected-packages (&optional noconfirm)
In GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS
=C2=A0appkit-2113.65 Version 12.7.6 (Build 21H1320)) of 2025-02-24 built =
on
=C2=A0armbob.lan
Windowing system distributor 'Apple', version 10.3.2575
System Description: =C2=A0macOS 15.5
Configured using:
=C2=A0'configure --with-ns '--enable-locallisppath=3D/Library/Application=
=C2=A0Support/Emacs/${version}/site-lisp:/Library/Application
=C2=A0Support/Emacs/site-lisp' --with-modules 'CFLAGS=3D-DFD_SETSIZE=3D10=
000
=C2=A0-DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=3Dno'
Configured features:
ACL GLIB GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB
Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 minibuffer-regexp-mode: t
=C2=A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
=
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
=
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
=
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
=
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)
Memory information:
((conses 16 39125 8959) (symbols 48 5269 0) (strings 32 12063 2290)
=C2=A0(string-bytes 1 290705) (vectors 16 9393)
=C2=A0(vector-slots 8 106790 6658) (floats 8 21 8) (intervals 56 253 5)
=C2=A0(buffers 992 11))
--=_Le8e2ihjfbmv9gwUwHKtwwxdxPtq7v39iDuO-Dt5OaHCvgsi
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><meta http-equiv=3D"content-type" content=3D"text/html; chars=
et=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; -webkit-nbsp=
-mode: space; line-break: after-white-space;"><font face=3D"Menlo"><span =
style=3D"font-size: 14px;">Running 'package-install-file' on a tar file m=
ight throw a 'Wrong type argument: arrayp, nil' error from 'tar--check-de=
scriptor=E2=80=99. The problem comes from assumptions made by 'pack=
age--description-file' and tar-mode about the filenames contained in the =
tar file. I=E2=80=99ve written a detailed description of the error =
and root cause </span></font><a href=3D"https://github.com/ajrosen/b=
ookmarks-menu/discussions/2"><font face=3D"Menlo" style=3D"font-size: 14p=
x;">here</font></a><font face=3D"Menlo"><span style=3D"font-size: 14px;">=
=2E</span></font><div><font face=3D"Menlo"><span style=3D"font-size: 14px=
;"><br></span></font></div><div><div><font face=3D"Menlo" style=3D"font-s=
ize: 14px;">I propose adding a 'condition-case' to 'package-install-file'=
to return a friendly message.</font></div><div><font face=3D"Menlo" styl=
e=3D"font-size: 14px;"><br></font></div><div><span style=3D"font-size: 14=
px; font-family: Menlo;"><br></span></div><div><span style=3D"font-size: =
14px; font-family: Menlo;">diff --git a/lisp/emacs-lisp/package.el b/lisp=
/emacs-lisp/package.el</span></div><div><font face=3D"Menlo" style=3D"fon=
t-size: 14px;">index 82fcf439a11..01f659e6982 100644</font></div><div><fo=
nt face=3D"Menlo" style=3D"font-size: 14px;">--- a/lisp/emacs-lisp/packag=
e.el</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">+++=
b/lisp/emacs-lisp/package.el</font></div><div><font face=3D"Menlo" style=
=3D"font-size: 14px;">@@ -2439,8 +2439,10 @@ directory."</font></div><div=
><font face=3D"Menlo" style=3D"font-size: 14px;"> &nb=
sp;(insert-file-contents-literally file)</font></div><div><font face=3D"M=
enlo" style=3D"font-size: 14px;"> (set-visited-=
file-name file)</font></div><div><font face=3D"Menlo" style=3D"font-size:=
14px;"> (set-buffer-modified-p nil)</font></di=
v><div><font face=3D"Menlo" style=3D"font-size: 14px;">- &n=
bsp;(when (string-match "\\.tar\\'" file) (tar-mode)))</font></div><div><=
font face=3D"Menlo" style=3D"font-size: 14px;">- (package-in=
stall-from-buffer)))</font></div><div><font face=3D"Menlo" style=3D"font-=
size: 14px;">+ (when (string-match "\\.tar\\'" file) =
(tar-mode)</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px=
;">+ (condition-case nil</font><=
/div><div><font face=3D"Menlo" style=3D"font-size: 14px;">+ =
(package-install-from-buffer)</=
font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">+<span cl=
ass=3D"Apple-tab-span" style=3D"white-space: pre;">=09</span> =
(error (message "%s is not a valid package file" (file-name=
-nondirectory file))))))))</font></div><div><font face=3D"Menlo" style=3D=
"font-size: 14px;"> </font></div><div><font face=3D"Menlo" style=3D"=
font-size: 14px;"> ;;;###autoload</font></div><div><font face=3D"Men=
lo" style=3D"font-size: 14px;"> (defun package-install-selected-pack=
ages (&optional noconfirm)</font></div></div><div><font face=3D"Menlo=
" style=3D"font-size: 14px;"><br></font></div><div><br></div><div><div><f=
ont face=3D"Menlo" style=3D"font-size: 14px;">In GNU Emacs 30.1 (build 1,=
aarch64-apple-darwin21.6.0, NS</font></div><div><font face=3D"Menlo" sty=
le=3D"font-size: 14px;"> appkit-2113.65 Version 12.7.6 (Build 21H132=
0)) of 2025-02-24 built on</font></div><div><font face=3D"Menlo" style=3D=
"font-size: 14px;"> armbob.lan</font></div><div><font face=3D"Menlo"=
style=3D"font-size: 14px;">Windowing system distributor 'Apple', version=
10.3.2575</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px=
;">System Description: macOS 15.5</font></div><div><font face=3D"Me=
nlo" style=3D"font-size: 14px;"><br></font></div><div><font face=3D"Menlo=
" style=3D"font-size: 14px;">Configured using:</font></div><div><font fac=
e=3D"Menlo" style=3D"font-size: 14px;"> 'configure --with-ns '--enab=
le-locallisppath=3D/Library/Application</font></div><div><font face=3D"Me=
nlo" style=3D"font-size: 14px;"> Support/Emacs/${version}/site-lisp:=
/Library/Application</font></div><div><font face=3D"Menlo" style=3D"font-=
size: 14px;"> Support/Emacs/site-lisp' --with-modules 'CFLAGS=3D-DFD=
_SETSIZE=3D10000</font></div><div><font face=3D"Menlo" style=3D"font-size=
: 14px;"> -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=3Dno'</font></=
div><div><font face=3D"Menlo" style=3D"font-size: 14px;"><br></font></div=
><div><font face=3D"Menlo" style=3D"font-size: 14px;">Configured features=
:</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">ACL GL=
IB GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG</font></d=
iv><div><font face=3D"Menlo" style=3D"font-size: 14px;">RSVG SQLITE3 THRE=
ADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB</font></div><div><=
font face=3D"Menlo" style=3D"font-size: 14px;"><br></font></div><div><fon=
t face=3D"Menlo" style=3D"font-size: 14px;">Important settings:</font></d=
iv><div><font face=3D"Menlo" style=3D"font-size: 14px;"> value of $=
LANG: en_US.UTF-8</font></div><div><font face=3D"Menlo" style=3D"font-siz=
e: 14px;"> locale-coding-system: utf-8-unix</font></div><div><font =
face=3D"Menlo" style=3D"font-size: 14px;"><br></font></div><div><font fac=
e=3D"Menlo" style=3D"font-size: 14px;">Major mode: Lisp Interaction</font=
></div><div><font face=3D"Menlo" style=3D"font-size: 14px;"><br></font></=
div><div><font face=3D"Menlo" style=3D"font-size: 14px;">Minor modes in e=
ffect:</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">&=
nbsp; tooltip-mode: t</font></div><div><font face=3D"Menlo" style=3D"font=
-size: 14px;"> global-eldoc-mode: t</font></div><div><font face=3D"=
Menlo" style=3D"font-size: 14px;"> eldoc-mode: t</font></div><div><=
font face=3D"Menlo" style=3D"font-size: 14px;"> show-paren-mode: t<=
/font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;"> e=
lectric-indent-mode: t</font></div><div><font face=3D"Menlo" style=3D"fon=
t-size: 14px;"> mouse-wheel-mode: t</font></div><div><font face=3D"=
Menlo" style=3D"font-size: 14px;"> tool-bar-mode: t</font></div><di=
v><font face=3D"Menlo" style=3D"font-size: 14px;"> menu-bar-mode: t=
</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;"> =
file-name-shadow-mode: t</font></div><div><font face=3D"Menlo" style=3D"f=
ont-size: 14px;"> global-font-lock-mode: t</font></div><div><font f=
ace=3D"Menlo" style=3D"font-size: 14px;"> font-lock-mode: t</font><=
/div><div><font face=3D"Menlo" style=3D"font-size: 14px;"> blink-cu=
rsor-mode: t</font></div><div><font face=3D"Menlo" style=3D"font-size: 14=
px;"> minibuffer-regexp-mode: t</font></div><div><font face=3D"Menl=
o" style=3D"font-size: 14px;"> line-number-mode: t</font></div><div=
><font face=3D"Menlo" style=3D"font-size: 14px;"> indent-tabs-mode:=
t</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;"> =
; transient-mark-mode: t</font></div><div><font face=3D"Menlo" style=3D"f=
ont-size: 14px;"> auto-composition-mode: t</font></div><div><font f=
ace=3D"Menlo" style=3D"font-size: 14px;"> auto-encryption-mode: t</=
font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;"> au=
to-compression-mode: t</font></div><div><font face=3D"Menlo" style=3D"fon=
t-size: 14px;"><br></font></div><div><font face=3D"Menlo" style=3D"font-s=
ize: 14px;">Load-path shadows:</font></div><div><font face=3D"Menlo" styl=
e=3D"font-size: 14px;">None found.</font></div><div><font face=3D"Menlo" =
style=3D"font-size: 14px;"><br></font></div><div><font face=3D"Menlo" sty=
le=3D"font-size: 14px;">Features:</font></div><div><font face=3D"Menlo" s=
tyle=3D"font-size: 14px;">(shadow sort mail-extr emacsbug message mailcap=
yank-media puny dired</font></div><div><font face=3D"Menlo" style=3D"fon=
t-size: 14px;">dired-loaddefs rfc822 mml mml-sec password-cache epa deriv=
ed epg rfc6068</font></div><div><font face=3D"Menlo" style=3D"font-size: =
14px;">epg-config gnus-util text-property-search time-date subr-x mm-deco=
de</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">mm-bo=
dies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader</font><=
/div><div><font face=3D"Menlo" style=3D"font-size: 14px;">cl-loaddefs cl-=
lib sendmail rfc2047 rfc2045 ietf-drums mm-util</font></div><div><font fa=
ce=3D"Menlo" style=3D"font-size: 14px;">mail-prsvr mail-utils rmc iso-tra=
nsl tooltip cconv eldoc paren electric</font></div><div><font face=3D"Men=
lo" style=3D"font-size: 14px;">uniquify ediff-hook vc-hooks lisp-float-ty=
pe elisp-mode mwheel</font></div><div><font face=3D"Menlo" style=3D"font-=
size: 14px;">term/ns-win ns-win ucs-normalize mule-util term/common-win t=
ool-bar dnd</font></div><div><font face=3D"Menlo" style=3D"font-size: 14p=
x;">fontset image regexp-opt fringe tabulated-list replace newcomment</fo=
nt></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">text-mode l=
isp-mode prog-mode register page tab-bar menu-bar rfn-eshadow</font></div=
><div><font face=3D"Menlo" style=3D"font-size: 14px;">isearch easymenu ti=
mer select scroll-bar mouse jit-lock font-lock syntax</font></div><div><f=
ont face=3D"Menlo" style=3D"font-size: 14px;">font-core term/tty-colors f=
rame minibuffer nadvice seq simple cl-generic</font></div><div><font face=
=3D"Menlo" style=3D"font-size: 14px;">indonesian philippine cham georgian=
utf-8-lang misc-lang vietnamese</font></div><div><font face=3D"Menlo" st=
yle=3D"font-size: 14px;">tibetan thai tai-viet lao korean japanese eucjp-=
ms cp51932 hebrew greek</font></div><div><font face=3D"Menlo" style=3D"fo=
nt-size: 14px;">romanian slovak czech european ethiopic indian cyrillic c=
hinese</font></div><div><font face=3D"Menlo" style=3D"font-size: 14px;">c=
omposite emoji-zwj charscript charprop case-table epa-hook</font></div><d=
iv><font face=3D"Menlo" style=3D"font-size: 14px;">jka-cmpr-hook help abb=
rev obarray oclosure cl-preloaded button loaddefs</font></div><div><font =
face=3D"Menlo" style=3D"font-size: 14px;">theme-loaddefs faces cus-face m=
acroexp files window text-properties</font></div><div><font face=3D"Menlo=
" style=3D"font-size: 14px;">overlay sha1 md5 base64 format env code-page=
s mule custom widget keymap</font></div><div><font face=3D"Menlo" style=3D=
"font-size: 14px;">hashtable-print-readable backquote threads kqueue coco=
a ns multi-tty</font></div><div><font face=3D"Menlo" style=3D"font-size: =
14px;">make-network-process emacs)</font></div><div><font face=3D"Menlo" =
style=3D"font-size: 14px;"><br></font></div><div><font face=3D"Menlo" sty=
le=3D"font-size: 14px;">Memory information:</font></div><div><font face=3D=
"Menlo" style=3D"font-size: 14px;">((conses 16 39125 8959) (symbols 48 52=
69 0) (strings 32 12063 2290)</font></div><div><font face=3D"Menlo" style=
=3D"font-size: 14px;"> (string-bytes 1 290705) (vectors 16 9393)</fo=
nt></div><div><font face=3D"Menlo" style=3D"font-size: 14px;"> (vect=
or-slots 8 106790 6658) (floats 8 21 8) (intervals 56 253 5)</font></div>=
<div><font face=3D"Menlo" style=3D"font-size: 14px;"> (buffers 992 1=
1))</font></div></div><div><br></div></body></html>
--=_Le8e2ihjfbmv9gwUwHKtwwxdxPtq7v39iDuO-Dt5OaHCvgsi--
Andy Rosen <ajr@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#78636; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.