From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 11:54:54 2022 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 16:54:54 +0000 Received: from localhost ([127.0.0.1]:55174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p03sk-0004ZY-AU for submit@debbugs.gnu.org; Tue, 29 Nov 2022 11:54:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:58752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p03si-0004ZS-86 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 11:54:53 -0500 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 1p03sh-0003fq-Pp for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:54:51 -0500 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p03sg-0007sf-5S for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 11:54:51 -0500 Received: by mail-qk1-x731.google.com with SMTP id d8so10201615qki.13 for ; Tue, 29 Nov 2022 08:54:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=g0VZrgUYNeySFDSTdAifpsESv+afcvYwR9j+/KQW2GA=; b=N6kjWHt04BwwXWYAuANMLjSxdJAgjkr/VLnhbPgDW6C4eDlT2c37k359E/v+YUouPE TfmUlzWxS8pC+yqscDq+Ru6aCz69p2LaWKWRF9klVFit9QonAbriIf4ha57leqQKCiMi x4eHjaptA6tMmkWjo0QNn/5ZjvVDuWZhlnGKy8GXZC14dZDaYtVURquZYBn929IruGtq MeR1CC879+T3uAaz+J2ryNt+eKGnFtlZ+4hceMZhFlk8m8L2LT1KmvilC9vxyTNjA9cQ ZQPu+miYbWQdY2O/R7xhGn/5XR5lfVeFdvnIt115AQcabda/LITZ7HsrKAFr4T44+S3Z yEIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=g0VZrgUYNeySFDSTdAifpsESv+afcvYwR9j+/KQW2GA=; b=5/5n7htyG+FqZN0DAfbRgIYzIXm0Krgi4fYcBYsLsvuXZXLMkPCoRkg5SJ0wc8AQoE Yop8+PzhK/J2y/x7C3HmQd7sOxDwcsk1fMBBdDrbVrqtmuRW+HtiwRSc9YBMOj16p3s9 8PNun3EiLXQN2fOZmF+Rf563cW3MvDGn7phnFedQqFJkZ93KzP87dB6vuQF4a3M6GeaE ZZ/f1xktEvLBOI/CvJQ06mJRZQDVfLwGpqAGG8aUdGj78LkttjV3+XMj16Eq/QO/GFqA kKcDBCnoVL4+638ebnUNPDwUqdUWCYm2ja9GXyXBAGYc+HBttqpnWp6yXSn38Ko8+o1S 8yuA== X-Gm-Message-State: ANoB5pmpWoQgrdjQYZ9K5e/mPotsHlD69vU5bnKPhCsvlGc1/zh9x+Dc dkSdP3dhJVax38KJ3xiavSg= X-Google-Smtp-Source: AA0mqf4GsMjbcbFZQ0eC+Ju/V1uSU93aFjYiXXPi7dawtBvb2NQRWp4DgbJ603ATzSKCblpvZ9u7nA== X-Received: by 2002:a05:620a:148c:b0:6fb:8eb:a6bc with SMTP id w12-20020a05620a148c00b006fb08eba6bcmr52809326qkj.101.1669740887369; Tue, 29 Nov 2022 08:54:47 -0800 (PST) Received: from muffinmac ([193.19.254.90]) by smtp.gmail.com with ESMTPSA id g4-20020ac870c4000000b003992448029esm8802312qtp.19.2022.11.29.08.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 08:54:46 -0800 (PST) From: Andrii Kolomoiets To: bug-gnu-emacs@gnu.org Subject: 29.0.50; [PATCH] package.el: Insert news for installed packages only Date: Tue, 29 Nov 2022 18:54:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::731; envelope-from=andreyk.mad@gmail.com; helo=mail-qk1-x731.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Philip Kaludercic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hi, In some folder, e.g. "/tmp": 1. Create folder named "news" 2. emacs -Q 3. M-x list-packages 4. RET on any available not installed package This will produce "Read error: Is a directory, /tmp/news" message. In GNU Emacs 29.0.50 Repository revision: 2772ebe3667f28cefd0d6134204ce6a3c7a8c323 Repository branch: master Adding news to package description was introuced in dd98fedd0c7f27bfba046d761042c19181cb461d Adding Philip to Cc as the author of the original commit. Attached patch solves issue by checking that: 1. pkg-dir is not nil 2. pkg-dir is not 'builtin 3. "news" is a regular file --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Insert-news-for-installed-packages-only.patch >From 9bd185609643ec861b02b4327295bb6db3b82974 Mon Sep 17 00:00:00 2001 From: muffinmad Date: Mon, 28 Nov 2022 23:09:59 +0200 Subject: [PATCH] Insert news for installed packages only * lisp/emacs-lisp/package.el (describe-package-1): Check package is installed and "news" is a regular file. --- lisp/emacs-lisp/package.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 8d44fae30a0..f722eb8fae9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2696,8 +2696,10 @@ describe-package-1 (signed (if desc (package-desc-signed desc))) (maintainer (cdr (assoc :maintainer extras))) (authors (cdr (assoc :authors extras))) - (news (and-let* ((file (expand-file-name "news" pkg-dir)) - ((file-readable-p file))) + (news (and-let* (pkg-dir + ((not built-in)) + (file (expand-file-name "news" pkg-dir)) + ((file-regular-p file))) file))) (when (string= status "avail-obso") (setq status "available obsolete")) -- 2.32.1 (Apple Git-133) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 16:06:46 2022 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 21:06:46 +0000 Received: from localhost ([127.0.0.1]:56339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07oT-0000kQ-TF for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:06:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:60276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07oP-0000kK-NT for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:06:44 -0500 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 1p07oL-0001rl-PW for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:06:41 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p07oI-0004MM-KU for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:06:37 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E2038240103 for ; Tue, 29 Nov 2022 22:06:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669755991; bh=xzu5gvqvy6lwBWqDItjAmKfg0i+l6hY1q495DrnHqss=; h=From:To:Cc:Subject:Date:From; b=Os9P3wsWOr5TYjLpDgSn58dMfJujQNzkh8cjKiFj2Sk0ornVLrdaQ17b0LaiG6U2Y eXxu/AWUBsdIeiRAptO8JdFtn21Q0bLHHDJFOlFuOsYaeCoztM4cdeTapIax4cMtqe /hN9r4XKxVrpAnBmtZg326U6RwFJ7q9eWJRj8mdd4H5+/T8rFmQtti//P1O4Tn3Xdz +935NL4XcHwaxO3WiPAAsWsJa99dQL4ZmML9GvALzhEGwTadN5pBlnYHxSiehyGKqx x1WAmprxderad7sgwPvcQvKvnZm02ReKjasByYT0e+cJKv1JwLaq39xik1uuFvYv43 8EEDQUC0dRfEA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NMFJ70tntz6tmH; Tue, 29 Nov 2022 22:06:30 +0100 (CET) From: Philip Kaludercic To: Andrii Kolomoiets Subject: Re: 29.0.50; [PATCH] package.el: Insert news for installed packages only In-Reply-To: (Andrii Kolomoiets's message of "Tue, 29 Nov 2022 18:54:44 +0200") References: Date: Tue, 29 Nov 2022 21:06:33 +0000 Message-ID: <87mt89bhd2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-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.3 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Andrii Kolomoiets writes: > Hi, > > In some folder, e.g. "/tmp": > 1. Create folder named "news" > 2. emacs -Q > 3. M-x list-packages > 4. RET on any available not installed package > > This will produce "Read error: Is a directory, /tmp/news" message. > > In GNU Emacs 29.0.50 > Repository revision: 2772ebe3667f28cefd0d6134204ce6a3c7a8c323 > Repository branch: master > > Adding news to package description was introuced in > dd98fedd0c7f27bfba046d761042c19181cb461d > > Adding Philip to Cc as the author of the original commit. > > Attached patch solves issue by checking that: > 1. pkg-dir is not nil > 2. pkg-dir is not 'builtin > 3. "news" is a regular file This sounds good. > From 9bd185609643ec861b02b4327295bb6db3b82974 Mon Sep 17 00:00:00 2001 > From: muffinmad > Date: Mon, 28 Nov 2022 23:09:59 +0200 > Subject: [PATCH] Insert news for installed packages only > > * lisp/emacs-lisp/package.el (describe-package-1): Check package is > installed and "news" is a regular file. > --- > lisp/emacs-lisp/package.el | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 8d44fae30a0..f722eb8fae9 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -2696,8 +2696,10 @@ describe-package-1 > (signed (if desc (package-desc-signed desc))) > (maintainer (cdr (assoc :maintainer extras))) > (authors (cdr (assoc :authors extras))) > - (news (and-let* ((file (expand-file-name "news" pkg-dir)) > - ((file-readable-p file))) > + (news (and-let* (pkg-dir > + ((not built-in)) > + (file (expand-file-name "news" pkg-dir)) > + ((file-regular-p file))) Shouldn't we keep `file-readable-p'? > file))) > (when (string= status "avail-obso") > (setq status "available obsolete")) From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 16:16:19 2022 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 21:16:19 +0000 Received: from localhost ([127.0.0.1]:56379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07xj-0000pW-04 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:16:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:37056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07xd-0000pM-4R for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:16:16 -0500 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 1p07xd-0005em-0q for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:16:13 -0500 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p07xZ-0006RY-Li for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:16:12 -0500 Received: by mail-qk1-x72b.google.com with SMTP id d7so10850766qkk.3 for ; Tue, 29 Nov 2022 13:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=edNj6u27Vphx0F0ybUx0Mg3lMiB6x49qW2r45UYOUWw=; b=kYMC1b6EX5nICDGGDK5RdpgJo/Gtyzh9WTKFQ1932UmdzJp0jijvDG7OsRAiVigICJ 8uuLIotxXKG3r4VPs6VpTW+xwfwf2V5o0IanJojSk+YLBjLLDuYV37TYk3z+g7TFlNRf tFnTBgtdfeW+sT4kue2jrEHp2NKf2NCRgZ48C5hi2tSLjfySJKMQ8iR0rQU4/mcDsqTP V/TxO6F+YizWOS0GQedPbkZcb47eWDd6WbKg3fxBt4VWQvPO7cHLTcqanPNLWsmt+4gl mFMfvDRUPD7eNY73CrheyWkR3Zt6HDyU/rwSrzd37vnQRCXHIMmL6Ml1PchJFHOcw2cd BGNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=edNj6u27Vphx0F0ybUx0Mg3lMiB6x49qW2r45UYOUWw=; b=5XaFwsoHOtEcbFCJhdSBj1L3q0tsbGZ6Hr9vBmT4gz4u/q887zo4YM9WXuxRVgHClg tB8nDaTaF1a+n2cI/kvc3zhkpc/ru7wMk9CgfkoTdoDfpZSJtFP1SocugSbl8HYQaoSj 3SyS39c41DXuoJpoyuWCY996d6ZetLTo1NaziQqVQ2p9mNDdKDmcqSNWBoY7yJcqO+mq 4j50jyxu/j79/+gEL+SCrJxaJ8eu55qz0VwBdcXjnqBWAT4lu4aSEuUY5/zKjiW3U8W4 I4tP6zujUF9ezdAVu+U4sBNlyrSzfPwBJ5ygUvRfgI3k1/OyKwfYZ9/5fhkPPgKgxkLx UCfg== X-Gm-Message-State: ANoB5plpw9B9imU6eCRALbGW9u1WNnHfi2gx26TxNTczV0qvtPiCE3Q4 wZ0R5lz/sIjw50YzVjD3i644rb1CaRA= X-Google-Smtp-Source: AA0mqf5QZaHKTOOgHQGNgBHQOcL0EOjnUtJoq6Yyp3kviwlIItKlFH1vXeBIVEvAbk1Q38HzwNtIGQ== X-Received: by 2002:a05:620a:13d7:b0:6fb:57cb:47ce with SMTP id g23-20020a05620a13d700b006fb57cb47cemr38457199qkl.452.1669756563109; Tue, 29 Nov 2022 13:16:03 -0800 (PST) Received: from muffinmac ([193.19.254.90]) by smtp.gmail.com with ESMTPSA id w15-20020a05620a424f00b006b953a7929csm11307536qko.73.2022.11.29.13.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 13:16:02 -0800 (PST) From: Andrii Kolomoiets To: Philip Kaludercic Subject: Re: 29.0.50; [PATCH] package.el: Insert news for installed packages only In-Reply-To: <87mt89bhd2.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 29 Nov 2022 21:06:33 +0000") References: <87mt89bhd2.fsf@posteo.net> Date: Tue, 29 Nov 2022 23:16:00 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72b; envelope-from=andreyk.mad@gmail.com; helo=mail-qk1-x72b.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Philip Kaludercic writes: >> + ((file-regular-p file))) > > Shouldn't we keep `file-readable-p'? I think we should use `file-regular-p' so even if the pkg-dir will contain directory named "news" we will not try to insert it with `insert-file-contents'. -- Andrii From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 16:25:43 2022 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 21:25:43 +0000 Received: from localhost ([127.0.0.1]:56440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p086o-0000we-QD for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:25:43 -0500 Received: from lists.gnu.org ([209.51.188.17]:53078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p086n-0000wY-Gp for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:25:41 -0500 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 1p086i-0008JB-Gs for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:25:38 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p086g-0008Af-0v for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:25:36 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B7C81240026 for ; Tue, 29 Nov 2022 22:25:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669757131; bh=qllyOSAQm88hYLzOEDYpmBHxwfkdAVOFndS3kCti7XM=; h=From:To:Cc:Subject:Date:From; b=KiHtAn3IYhwaPHM1057v1XGChT5HOZlX6FZa6M1FxUpjIsd9rxzNsrqEf+qIFCYFe d2kwHhFGUVjddIUR9xIqnRBout14ldx4c62+icSZ5JagF8I6UgW8mwyGp27FmGSkHc 12d+NdX9Pd12tkWGCZ06m44a6gnGYuIBwKvJZXSdNkGoMNIuCAP9+0vvz0poc3fWGl wXC1YOGO7T6NHw3mPzbEhwZJpqKr6JqhxI9EPmeeMPDX/mEfi2DU8I6VWyyKpAnszF +NPe7VzLHrU0SanWGH+VgKVc06u5o5Tqb6eVI3OMKKD3WGxhsUiR5MxPiA1RN+ILGs 7iifXipwijeDg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NMFk30nMTz9rxD; Tue, 29 Nov 2022 22:25:30 +0100 (CET) From: Philip Kaludercic To: Andrii Kolomoiets Subject: Re: 29.0.50; [PATCH] package.el: Insert news for installed packages only In-Reply-To: (Andrii Kolomoiets's message of "Tue, 29 Nov 2022 23:16:00 +0200") References: <87mt89bhd2.fsf@posteo.net> Date: Tue, 29 Nov 2022 21:25:32 +0000 Message-ID: <87edtlbghf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Andrii Kolomoiets writes: > Philip Kaludercic writes: > >>> + ((file-regular-p file))) >> >> Shouldn't we keep `file-readable-p'? > > I think we should use `file-regular-p' so even if the pkg-dir will > contain directory named "news" we will not try to insert it with > `insert-file-contents'. I agree that `file-regular-p' is sensible, what I meant was using `file-readable-p' in addition to that. But I guess that all in all, this is a rare circumstance... From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 29 16:38:35 2022 Received: (at 59684) by debbugs.gnu.org; 29 Nov 2022 21:38:35 +0000 Received: from localhost ([127.0.0.1]:56565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08JH-000191-Hu for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:38:35 -0500 Received: from mail-qk1-f180.google.com ([209.85.222.180]:39805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08JF-00018v-9v for 59684@debbugs.gnu.org; Tue, 29 Nov 2022 16:38:34 -0500 Received: by mail-qk1-f180.google.com with SMTP id g10so10898323qkl.6 for <59684@debbugs.gnu.org>; Tue, 29 Nov 2022 13:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4jyR/PHSHUcFWjxRzSWA29ifj3tktNPkgrANCVX3RNU=; b=RTqkDyNw6aDUQz5HOUaIC5F0dVmrtM3J/ZKYbhq1/iqWNtLwH8edGZCs5hUlZ+61aK FjKdFeLr6AAw/K3L5BTLQxrXTrP4FVCqlRLm7PvtK3aNK6s43xan32Q+4mb4tJQZw1lc G2DiQoIQmu5GPa/CwOqXg+RWaBuBm7CzZ/itm2qiq4plDP28X/NXtiJZ2lQsm/uBGN4t kTGEns3v1LvaQiFhe2VHqgkx4VBdibuSz11HxJJNzk+p2ZXQqazzEfksz2egUcEa0Pkz QzzObc9U2R8obEC3m5tfpDtDJgNC/+t72KzgOK+rxAn/Wf9cBxFJaFF2mMceT2qopcFz 6LtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4jyR/PHSHUcFWjxRzSWA29ifj3tktNPkgrANCVX3RNU=; b=kyBBtZnP4//QLxzPGgtA40mvX1MYefw4cwQfy5ymPx5uX8v70I0NrizhkspbqOf5cd ihR0rxl+eTto6GqtcInq1HWi1EWWt6kp2TV87x/bxIdLrnXYPrjLs47im/idne1ZEKEC ZeT0PW0xxwlnaOefdIUu2oRcfPsRQ48v5Uz2ykX5wRKwg/07v/LgWI0mlOhUg4mbxuPM kTRMvNPDxZa2RUKebYx3G6IwToPQTXj6JIx+DorUTKaJRWbElOJf363YtoNn10qds/H9 X67Ds84HKo3x/UbeAEjYpbTUCGI5nLDZfh1WQGI5RpmkhkmrGFuRjj7xaTVVJ2J2KlVf RTog== X-Gm-Message-State: ANoB5pkTQa/m7bNSY78+ITAx9QbCUjYQKIwGOPwQHD50bRKMRzzGhfP/ FTkmnUfa0y0P0xchnLXnm2sepb2BhGQ= X-Google-Smtp-Source: AA0mqf6XDvKTW3Vhbf7AS8pMHycurcpX8aIELFeNlga6JDek/Pce+BVpAvJBKBjQYN8iIkykNQHMdg== X-Received: by 2002:a05:620a:608c:b0:6ed:2f5f:cdd1 with SMTP id dx12-20020a05620a608c00b006ed2f5fcdd1mr52500266qkb.9.1669757907316; Tue, 29 Nov 2022 13:38:27 -0800 (PST) Received: from muffinmac ([193.19.254.90]) by smtp.gmail.com with ESMTPSA id o22-20020a05620a2a1600b006eeb3165554sm11392588qkp.19.2022.11.29.13.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 13:38:26 -0800 (PST) From: Andrii Kolomoiets To: Philip Kaludercic Subject: Re: bug#59684: 29.0.50; [PATCH] package.el: Insert news for installed packages only In-Reply-To: <87edtlbghf.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 29 Nov 2022 21:25:32 +0000") References: <87mt89bhd2.fsf@posteo.net> <87edtlbghf.fsf@posteo.net> Date: Tue, 29 Nov 2022 23:38:24 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59684 Cc: 59684@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Philip Kaludercic writes: >>>> + ((file-regular-p file))) >>> >>> Shouldn't we keep `file-readable-p'? >> >> I think we should use `file-regular-p' so even if the pkg-dir will >> contain directory named "news" we will not try to insert it with >> `insert-file-contents'. > > I agree that `file-regular-p' is sensible, what I meant was using > `file-readable-p' in addition to that. But I guess that all in all, > this is a rare circumstance... Oh, right. Makes sense. I've updated the patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Insert-news-for-installed-packages-only.patch >From ac7fddd70d8cc1ff946826d4624370538032de7a Mon Sep 17 00:00:00 2001 From: muffinmad Date: Mon, 28 Nov 2022 23:09:59 +0200 Subject: [PATCH] Insert news for installed packages only * lisp/emacs-lisp/package.el (describe-package-1): Check package is installed and "news" is a regular file. --- lisp/emacs-lisp/package.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 8d44fae30a0..99538df228b 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2696,7 +2696,10 @@ describe-package-1 (signed (if desc (package-desc-signed desc))) (maintainer (cdr (assoc :maintainer extras))) (authors (cdr (assoc :authors extras))) - (news (and-let* ((file (expand-file-name "news" pkg-dir)) + (news (and-let* (pkg-dir + ((not built-in)) + (file (expand-file-name "news" pkg-dir)) + ((file-regular-p file)) ((file-readable-p file))) file))) (when (string= status "avail-obso") -- 2.32.1 (Apple Git-133) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 30 14:54:13 2022 Received: (at 59684-done) by debbugs.gnu.org; 30 Nov 2022 19:54:14 +0000 Received: from localhost ([127.0.0.1]:34761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0T9p-0004yn-J1 for submit@debbugs.gnu.org; Wed, 30 Nov 2022 14:54:13 -0500 Received: from mout02.posteo.de ([185.67.36.66]:41753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0T9o-0004yh-Qy for 59684-done@debbugs.gnu.org; Wed, 30 Nov 2022 14:54:13 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4DE36240101 for <59684-done@debbugs.gnu.org>; Wed, 30 Nov 2022 20:54:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669838047; bh=PS91JSZ5gJyxh1nhAdPCT2lJ+56A/iVXEHpE2sij9CI=; h=From:To:Cc:Subject:Date:From; b=UgAhm5shBGInyhEJR2431XhSKiMVVLMmh3CAvyBXKep8A+PJHwRM4KR9pCjCS5+QQ cU0xKLPcumHR5o1G0QzvgMM7u9+4mwQB/WXmwihR89GPwhZb7c4tOqkz2hCBqBjZBF E29CiFReiF5yuuP5sGSRRWMMtTgSO4UhwDj+7eILcKz71uyMV9d5EildCNryqfa5Sz aJmKMyMrt9dCMXTzLY731kdjSdRPc/OaSgQHdd+kqJF2m7IziSNqKtxo6jQX9Y+WBo NA7lQW/fUFLwNfvYyWOdzzJ7t/luC2c9RCbR6GAwnKtmmNANV4vad7oMcJzIrTT23C y87+6Y5hF72VA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NMqdq3TYLz6tsh; Wed, 30 Nov 2022 20:53:51 +0100 (CET) From: Philip Kaludercic To: Andrii Kolomoiets Subject: Re: bug#59684: 29.0.50; [PATCH] package.el: Insert news for installed packages only In-Reply-To: (Andrii Kolomoiets's message of "Tue, 29 Nov 2022 23:38:24 +0200") References: <87mt89bhd2.fsf@posteo.net> <87edtlbghf.fsf@posteo.net> Date: Wed, 30 Nov 2022 19:53:54 +0000 Message-ID: <87v8mww759.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59684-done Cc: 59684-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Andrii Kolomoiets writes: > Philip Kaludercic writes: > >>>>> + ((file-regular-p file))) >>>> >>>> Shouldn't we keep `file-readable-p'? >>> >>> I think we should use `file-regular-p' so even if the pkg-dir will >>> contain directory named "news" we will not try to insert it with >>> `insert-file-contents'. >> >> I agree that `file-regular-p' is sensible, what I meant was using >> `file-readable-p' in addition to that. But I guess that all in all, >> this is a rare circumstance... > > Oh, right. Makes sense. I've updated the patch. Thanks, I've pushed the change. From unknown Fri Aug 15 20:50:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Dec 2022 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator