From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#23692: 25.1.50; Package.el gets confused if file has no autoloads (could be a bug in update-directory-autoloads) Date: Fri, 3 Jun 2016 18:03:46 -0400 Message-ID: <5751FEC2.5080807@live.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="c456dplVFPb4G2jIOmwiFaF1s5EAq0l1H" X-Trace: ger.gmane.org 1464991558 28153 80.91.229.3 (3 Jun 2016 22:05:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jun 2016 22:05:58 +0000 (UTC) To: 23692@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 04 00:05:44 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b8xDQ-00009m-0a for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 00:05:16 +0200 Original-Received: from localhost ([::1]:57953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8xDP-0006bR-3d for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jun 2016 18:05:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8xDH-0006X5-LC for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:05:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8xDC-0002Vt-GO for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8xDC-0002Vn-DT for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b8xDC-0004UM-4N for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jun 2016 22:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23692 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146499144717184 (code B ref -1); Fri, 03 Jun 2016 22:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jun 2016 22:04:07 +0000 Original-Received: from localhost ([127.0.0.1]:53515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8xCI-0004T6-Sk for submit@debbugs.gnu.org; Fri, 03 Jun 2016 18:04:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8xCG-0004Sb-Gd for submit@debbugs.gnu.org; Fri, 03 Jun 2016 18:04:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8xCA-0002Af-IP for submit@debbugs.gnu.org; Fri, 03 Jun 2016 18:03:59 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8xCA-00029t-Ew for submit@debbugs.gnu.org; Fri, 03 Jun 2016 18:03:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8xC8-00069u-8h for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:03:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8xC3-00027N-5m for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:03:55 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.24]:49789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8xC2-00027I-R3 for bug-gnu-emacs@gnu.org; Fri, 03 Jun 2016 18:03:51 -0400 Original-Received: from [18.26.2.123] ([18.26.2.123]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0Lhkwb-1bm5Vk0ibB-00murw for ; Sat, 04 Jun 2016 00:03:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 X-Provags-ID: V03:K0:5Lo/dhdujaVhMQg8AYmYsKDGt5F/xAMPeOKdLWg/PR69+KvA/Im R04Bdl/+2cO4lDDle10FXtO2IbgOQAJ7e/pkYAWQvt8Hcv6RSyF1HV6OMlJg3AvHjXlAzGA mlnkbnU21tpS1fLLnCp3ZsNaOm1xsCwnFYXFygwWiO4V6k7EePNZmbxYSThWgLoaY/azivo cvNkJmCk5QVGxL0dZdBDA== X-UI-Out-Filterresults: notjunk:1;V01:K0:OiiRm/dIn8Y=:NxFpAOGKoTUCMABoR8rpYH oujVZukMjrhVAfThPd2yDvTks8SG0n+JlKqAqQvzCYvO+U6xicp/pMfi3pVAZJ93c4ByIfui4 IxE+8pNO1u+RVYRPMHccvMo7ot8kGZrmBpGSuRY/uNvLnJrRnKx2T2fBt++4r2n4eJFcE4obO LPnw8oBrQJ+qW49DxB4nBn2BdarfakIHkCctn83/YnWBx1n/QihBuhROxbIs3beZPwFe5UsZ3 akI9TNa3lFjyeaZDkJp0AgFuYpXnuCZECPpOo7nSKwsfnarMs3VCn4q5jSn/ytDTzfpnYMAby hq3vWo6z3/du3xoH/R+6FjP3EQpFkhaCW8UehnwTRqPBe4aTQfE+g8EIh+E2yfVtvvAZTsrMd fOPbQu6mGrdYqL3ib0P7v+oIQcASrWSOF/6KtM+2rv1Q1cdj22hcTi7V2GuFQGphNhukUlySp 4EpFJWtCyrgljuR1MEbXmIZ4GYuiqs99JqHR8m3qgcip+HyU5972zM7TA+SNTs3eBPJkIChgC cxGTgR31n+lVh2p336s4umdbc8T/5E1dcvf4ERTKURUSjDLwodQLRGAIW11lxlrq6OEm6Sp/P uDpBhYY+17GTeegzITySRaOgbq8F5NxK7JhQnR3aEF97hj5jImD1TNXPQDXc0PAmZyD5FAeH2 LJnR29vHHma43VdTvtpcfG68Cw9njZX8MJgl228a5x9MirypJ768NY8UKhoX2XccDTVY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119023 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --c456dplVFPb4G2jIOmwiFaF1s5EAq0l1H Content-Type: multipart/mixed; boundary="oVl725smk8CQSn8IRMhgxNBH2cleklhUG" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: bug-gnu-emacs@gnu.org Message-ID: <5751FEC2.5080807@live.com> Subject: 25.1.50; Package.el gets confused if file has no autoloads (could be a bug in update-directory-autoloads) --oVl725smk8CQSn8IRMhgxNBH2cleklhUG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When the a single-package file has no autoloads, the call to update-direc= tory-autoloads leaves the generated autoload files modified, but unsaved.= This causes package.el to prompt the user about killing a modified file.= Small repro: paste the following in *scratch* and run package-install-fro= m-buffer. ;;; test-package.el --- blah ;; Author: Me ;; Version: 1.0 (provide 'test-package) ;;; test-package.el ends here This will show the following message: "Buffer test-package-autoloads.el m= odified; kill anyway? (yes or no)" The problem happens when package.el reaches the following bit: (defun package-generate-autoloads (name pkg-dir) (let* (...) ... (let ((buf (find-buffer-visiting generated-autoload-file))) (when buf (kill-buffer buf))) ;; <-- HERE ...)) The particular path that leads to an error condition is the following: in= side of update-directory-autoloads, we see this: ;; Don't modify the file if its content has not been changed, so `m= ake' ;; dependencies don't trigger unnecessarily. (when changed (let ((version-control 'never)) (save-buffer))) The flag `changed` is only set to `t` if files autoloads are found. Howev= er, file without autoloads also get added to the generated autoloads file= : ;;;### (autoloads nil nil (some file names here) (0 0 0 ;;;;;; 0)) I'm not sure which part of this is a bug: package.el assuming that update= -directory-autoloads always saves the file after modifying it (which seem= s false), or update-directory-autoloads not saving the file. In any case,= it's probably a misfeature that package.el prompts the user about killin= g a modified autoloads file as part of the installation process. Thanks! Cl=C3=A9ment. In GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2016-05-28 built on clem-w50-mint Repository revision: 8377f2ed8aad863d6c59987b7b53fbceee46881e Windowing system distributor 'The X.Org Foundation', version 11.0.1150100= 0 System Description: Linux Mint 17.3 Rosa --oVl725smk8CQSn8IRMhgxNBH2cleklhUG-- --c456dplVFPb4G2jIOmwiFaF1s5EAq0l1H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXUf7CAAoJEPqg+cTm90wj47kP/iuwcIX1lGwU9GBLIP6Srsl4 zepbb6IoDNxG5PJogjSdT+Q3eo0VQPOVubLklxFBEYe/32WNoeMsMcM3wSvIGt0Q 2AtzeTeBXHQDDeglJPfkxFC9YaH4oSHYy8Kq78DQ390Uxh5Kdh2B5Bj+d9T61R6j xY8+E/EDy7gM1mG144s1Rs3iGOohvQMOnumo6CG84N8HNgktz1dafgo91mnyvxb1 RX7yNJtlxQt09ytmJ64k5+KN9Qx+Rwa8budHBfDglk/mn4UN6B4UXCeDuOoQkboS RRmklRGy3xWlt2EX3yG9XZA0JaMiFvv46T5LXzS+Pu3uBoGW2Mf5vAsOwKQukzPN NZhB8r9oxbJKNno4SccxFxF28XRzefi5SW9zWOwui14Gj8gGjMqSi0b3T/hmgjcd q/zty0pa3R9yvPJxRwOrsqufsKuWrDPnVxLPJAe3jGdb5rR+K6Ztr+9DbgPII0wV Fvee9fwS4Q7ysfvdYDdTgI3q6BTA1lAobVcwWyvvrqbvHlfxXe3lXxnHsH+9AVU1 Ty0yNAr1HI/lhjxMTu4Do3FAGoXjZ6y8b/SxPruPieUUaGBs/5pnjZCGQ27SebRQ iWZs+76+XynCLzT5YZNL6LBlUV5U34V4wSdZ3WTFymtJDQvThE3DWruf+674WQfY 4AHbUlhVMFJGlBOAeSRg =BO4A -----END PGP SIGNATURE----- --c456dplVFPb4G2jIOmwiFaF1s5EAq0l1H--