From unknown Fri Jun 20 07:16:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15108 <15108@debbugs.gnu.org> To: bug#15108 <15108@debbugs.gnu.org> Subject: Status: 24.3.50; Package dependency documentation Reply-To: bug#15108 <15108@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:16:04 +0000 retitle 15108 24.3.50; Package dependency documentation reassign 15108 emacs submitter 15108 Tom Willemse severity 15108 minor tag 15108 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 20:24:47 2013 Received: (at submit) by debbugs.gnu.org; 16 Aug 2013 00:24:47 +0000 Received: from localhost ([127.0.0.1]:33268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VA7qP-00069x-Vh for submit@debbugs.gnu.org; Thu, 15 Aug 2013 20:24:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58311) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VA7pY-00067u-6c for submit@debbugs.gnu.org; Thu, 15 Aug 2013 20:23:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA7pM-0000da-IT for submit@debbugs.gnu.org; Thu, 15 Aug 2013 20:23:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,T_DKIM_INVALID, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA7pM-0000dW-Ex for submit@debbugs.gnu.org; Thu, 15 Aug 2013 20:23:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA7pG-0008FE-KX for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2013 20:23:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA7pA-0000cY-R0 for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2013 20:23:34 -0400 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:56922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA7pA-0000cK-I3 for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2013 20:23:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=Su6Oilzlnmsx193+GP97Pz607Oby9QF+IlEjVw8MLmA=; b=EbAdB9Q47bf6AO7pN8oJeDjQXxeuY0jnd3XCEfjA5wJwCRxvYrwvXHdrBj05XG04ZmVV9cCupQwqQ189iORy32JJsy64dxVa6ckSnRhY+PMU04fPqmJJx/5EKGWB5I/8ohhiCxYhVEmDGcdqGcbR9HFMe35eeaJBGB4TIGgqcdc=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VA7oq-00032c-2R for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2013 02:23:08 +0200 From: Tom Willemse To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Package dependency documentation Date: Fri, 16 Aug 2013 02:23:07 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 73399355 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 15 Aug 2013 20:24:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -3.3 (---) --=-=-= Content-Type: text/plain I noticed that the "Packaging Basics" section in the Emacs Lisp manual suggests that version numbers in `Package-Requires' headers are optional, however the explanation of `Package-Requires' makes it clear that the version specifier is necessary and testing confirms this. The values `foo', `(foo)' and `((foo))' all cause an error to be signaled by `package-buffer-info'. This seems to me that there is no "possibly" about it. It's only a tiny change and I hope it's OK. I have tried to follow the guidelines found in the Emacs manual about sending patches, I didn't find any reference about diffs of multiple files, so I hope it's OK to send the diffs separately. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=ChangeLog.diff Content-Description: ChangeLog diff *** ChangeLog 2013-08-16 00:30:03.814759000 +0200 --- ChangeLog.new 2013-08-16 00:29:31.431138190 +0200 *************** *** 1,3 **** --- 1,8 ---- + 2013-08-15 Tom Willemse + + * package.texi (Packaging Basics): The minimal acceptable version + numbers specified in a package's dependencies are not optional. + 2013-08-15 Xue Fuqiao * markers.texi (The Region): Add/move indexes. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=package.diff Content-Description: package.texi diff *** package.texi 2013-08-16 00:30:09.127486000 +0200 --- package.texi.new 2013-08-16 00:29:44.384571450 +0200 *************** *** 68,78 **** once it is installed. @item Dependencies ! A list of other packages (possibly including minimal acceptable ! version numbers) on which this package depends. The list may be ! empty, meaning this package has no dependencies. Otherwise, ! installing this package also automatically installs its dependencies; ! if any dependency cannot be found, the package cannot be installed. @end table @cindex content directory, package --- 68,78 ---- once it is installed. @item Dependencies ! A list of other packages (including minimal acceptable version ! numbers) on which this package depends. The list may be empty, ! meaning this package has no dependencies. Otherwise, installing this ! package also automatically installs its dependencies; if any ! dependency cannot be found, the package cannot be installed. @end table @cindex content directory, package --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 23:46:39 2013 Received: (at 15108) by debbugs.gnu.org; 16 Aug 2013 03:46:39 +0000 Received: from localhost ([127.0.0.1]:33463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAAzm-0003cn-Kb for submit@debbugs.gnu.org; Thu, 15 Aug 2013 23:46:39 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:37552) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAAzj-0003cS-2O for 15108@debbugs.gnu.org; Thu, 15 Aug 2013 23:46:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA5JbA5IcgV6DEw X-IPAS-Result: Av8EABK/CFFLd/Nq/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA5JbA5IcgV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="22013879" Received: from 75-119-243-106.dsl.teksavvy.com (HELO pastel.home) ([75.119.243.106]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Aug 2013 23:46:21 -0400 Received: by pastel.home (Postfix, from userid 20848) id 7CAED63160; Thu, 15 Aug 2013 23:46:27 -0400 (EDT) From: Stefan Monnier To: Tom Willemse Subject: Re: bug#15108: 24.3.50; Package dependency documentation Message-ID: References: Date: Thu, 15 Aug 2013 23:46:27 -0400 In-Reply-To: (Tom Willemse's message of "Fri, 16 Aug 2013 02:23:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > The values `foo', `(foo)' and `((foo))' all cause an error to be > signaled by `package-buffer-info'. This seems to me that there is no > "possibly" about it. Indeed a lot of the code assumes that there's a version number in there, but some of the code does try to handle a nil value as well. I think it would be desirable to make it possible to leave the version number unspecified. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 02:58:10 2013 Received: (at 15108) by debbugs.gnu.org; 16 Aug 2013 06:58:10 +0000 Received: from localhost ([127.0.0.1]:33713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VADz6-0001Ws-Rw for submit@debbugs.gnu.org; Fri, 16 Aug 2013 02:58:09 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:43412) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VADz3-0001W3-8Q for 15108@debbugs.gnu.org; Fri, 16 Aug 2013 02:58:06 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7G6vvNQ006837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Aug 2013 06:57:58 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7G6vseq008396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Aug 2013 06:57:56 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7G6vsnY008393; Fri, 16 Aug 2013 06:57:54 GMT MIME-Version: 1.0 Message-ID: <4ae8e584-105f-4ba4-9126-6087067ad7d8@default> Date: Thu, 15 Aug 2013 23:57:53 -0700 (PDT) From: Drew Adams To: Stefan Monnier , Tom Willemse Subject: RE: bug#15108: 24.3.50; Package dependency documentation References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6668.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.1 (-----) > > The values `foo', `(foo)' and `((foo))' all cause an error to be > > signaled by `package-buffer-info'. This seems to me that there is no > > "possibly" about it. >=20 > Indeed a lot of the code assumes that there's a version number in there, > but some of the code does try to handle a nil value as well. > I think it would be desirable to make it possible to leave the version > number unspecified. +1; a BIG +1. You can use `Package Requires ((foo "0"))' as a workaround, but it's silly that you have to do that. If a library is not versioned, or if for some reason any version of it will do for the package that requires it, it should be possible to use just `Package Requires ((foo))'. Furthermore, if no library is required, it should be possible to omit a `Package-Requires' altogether - that should be equivalent to `Package-Requires ()'. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 03:36:06 2013 Received: (at 15108) by debbugs.gnu.org; 16 Aug 2013 07:36:06 +0000 Received: from localhost ([127.0.0.1]:33760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAEZp-0004ui-EG for submit@debbugs.gnu.org; Fri, 16 Aug 2013 03:36:06 -0400 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:52942) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAEZm-0004uB-GG for 15108@debbugs.gnu.org; Fri, 16 Aug 2013 03:36:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=C+MKzcIcqpiDCpjCjHuN0LOxoFLOPw7gE4rGyH/Lack=; b=Ebs4HNSYy3aG4GPxbiO8jwxZ3YOwmCmGfdCn1mgvXOWdp/lxJqk6YsQBdrU8RmJ6IazHxtWCv7cFClZKwVDgQGlWLOsHBy1FizpouFq6OEI2vt35a6BcrYou1xOROG23gjfdbu8kxQwYCgl0VMsjX//vfPsYz/5JcR24wsFoJaU=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VAEZf-0002qZ-GW; Fri, 16 Aug 2013 09:35:55 +0200 From: Tom Willemse To: Drew Adams Subject: Re: bug#15108: 24.3.50; Package dependency documentation References: <4ae8e584-105f-4ba4-9126-6087067ad7d8@default> Date: Fri, 16 Aug 2013 09:35:54 +0200 In-Reply-To: <4ae8e584-105f-4ba4-9126-6087067ad7d8@default> (Drew Adams's message of "Thu, 15 Aug 2013 23:57:53 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-alwaysdata-ID: 73442737 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Drew Adams writes: >> > The values `foo', `(foo)' and `((foo))' all cause an error to be >> > signaled by `package-buffer-info'. This seems to me that there is no >> > "possibly" about it. >> >> Indeed a lot of the code assumes that there's a version number in there, >> but some of the code does try to handle a nil value as well. >> I think it would be desirable to make it possible to leave the version >> number unspecified. > > +1; a BIG +1. I could look into that if you guys like. Any pointers on where to look apart from `package-buffer-info'? > You can use `Package Requires ((foo "0"))' as a workaround, but it's > silly that you have to do that. If a library is not versioned, or if > for some reason any version of it will do for the package that requires > it, it should be possible to use just `Package Requires ((foo))'. Would values of either `foo' for just a single package dependency, `(foo bar)' for packages without version dependencies and `(foo (baz "1.1.0") bar)' for mixed values be OK? That would be my preference, but perhaps this is to complex. > Furthermore, if no library is required, it should be possible to omit > a `Package-Requires' altogether - that should be equivalent to > `Package-Requires ()'. This is already possible isn't it? Most of my packages don't require anything and as such don't have a `Package-Requires' header. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 03:46:57 2013 Received: (at 15108) by debbugs.gnu.org; 16 Aug 2013 07:46:57 +0000 Received: from localhost ([127.0.0.1]:33776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAEkK-0005JV-6p for submit@debbugs.gnu.org; Fri, 16 Aug 2013 03:46:56 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:17220) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAEkH-0005JD-8H for 15108@debbugs.gnu.org; Fri, 16 Aug 2013 03:46:53 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7G7kjrq031057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Aug 2013 07:46:46 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7G7khvC029944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Aug 2013 07:46:44 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7G7khMd008368; Fri, 16 Aug 2013 07:46:43 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 16 Aug 2013 00:46:42 -0700 (PDT) From: Drew Adams To: Tom Willemse Subject: RE: bug#15108: 24.3.50; Package dependency documentation References: <4ae8e584-105f-4ba4-9126-6087067ad7d8@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6668.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.1 (-----) > > You can use `Package Requires ((foo "0"))' as a workaround, but it's > > silly that you have to do that. If a library is not versioned, or if > > for some reason any version of it will do for the package that requires > > it, it should be possible to use just `Package Requires ((foo))'. >=20 > Would values of either `foo' for just a single package dependency, `(foo > bar)' for packages without version dependencies and `(foo (baz "1.1.0") > bar)' for mixed values be OK? That would be my preference, but perhaps > this is to complex. Are you asking to be able to use (foo (baz "1.1.0") bar) as an alternative to ((foo) (baz "1.1.0") (bar))? IOW, `foo' instead of `(foo)' or (foo "0")? Sounds OK to me. Maybe someone else knows a reason why that would not work or be a good idea. > > Furthermore, if no library is required, it should be possible to omit > > a `Package-Requires' altogether - that should be equivalent to > > `Package-Requires ()'. >=20 > This is already possible isn't it? Most of my packages don't require > anything and as such don't have a `Package-Requires' header. Dunno. I ended up adding `Package-Requires' everywhere, because it wasn't clear to me that its absence means `Package-Requires ()', in practice. That said, an explicit `Package-Requires ()' makes it clear that there is no dependency, whereas if it is absent that could just mean that no one looked at the question. Nevertheless, optional is better, IMO. Leave it up to the programmer to decide whether to be crystal clear by adding an explicit empty spec. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 04:06:51 2013 Received: (at 15108) by debbugs.gnu.org; 16 Aug 2013 08:06:51 +0000 Received: from localhost ([127.0.0.1]:33817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAF3a-00063G-8u for submit@debbugs.gnu.org; Fri, 16 Aug 2013 04:06:50 -0400 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:32877) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAF3U-00062x-CV for 15108@debbugs.gnu.org; Fri, 16 Aug 2013 04:06:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=zdKaT3sPEXnWiPKdQL86xgRAT/Mrqhh2yKSMAO2IdRk=; b=WEo5DvZCxFYpXyZ4Hk45aBhzfwV9tXbjp5krNEN1BvtiLP08BGA4b3OZ0Q6Tm87WW9iUpNq0vZAJ6gBzbqsOlpZphMtduItFrphTBy/Tjx5KOrK8xvlb3c82E6aImshSAm33sy2S30CPBbOgGfBLZkEU/bDery9m03fZcdJeifk=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VAF3O-0007Wd-Vb; Fri, 16 Aug 2013 10:06:38 +0200 From: Tom Willemse To: Drew Adams Subject: Re: bug#15108: 24.3.50; Package dependency documentation References: <4ae8e584-105f-4ba4-9126-6087067ad7d8@default> Date: Fri, 16 Aug 2013 10:06:38 +0200 In-Reply-To: (Drew Adams's message of "Fri, 16 Aug 2013 00:46:42 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-alwaysdata-ID: 73446455 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Drew Adams writes: >> > You can use `Package Requires ((foo "0"))' as a workaround, but it's >> > silly that you have to do that. If a library is not versioned, or if >> > for some reason any version of it will do for the package that requires >> > it, it should be possible to use just `Package Requires ((foo))'. >> >> Would values of either `foo' for just a single package dependency, `(foo >> bar)' for packages without version dependencies and `(foo (baz "1.1.0") >> bar)' for mixed values be OK? That would be my preference, but perhaps >> this is to complex. > > Are you asking to be able to use (foo (baz "1.1.0") bar) as an > alternative to ((foo) (baz "1.1.0") (bar))? > > IOW, `foo' instead of `(foo)' or (foo "0")? Sounds OK to me. Maybe > someone else knows a reason why that would not work or be a good idea. It's not that I desperately want to use that, it just seems cleaner to me to be able to omit parentheses when they're not needed. But if someone else knows a reason not to do it, or if everyone else just thinks it's messy or complicated, that would be reasons not to look into that direction. I'm asking for opinions on the idea that I had. And yes, you seem to understand my meaning correctly. In case anyone else didn't understand I'll try to illustrate: ;; Package-Requires: foo Would just be a dependency on any version of `foo', ;; Package-Requires: (foo bar) Would be a dependency on any version of both `foo' and `bar', ;; Package-Requires: (foo (baz "1.1.0") bar) Would be a dependency on any version of both `foo' and `bar' and version 1.1.0 of `baz'. A single package with a version could also be an option, like so: ;; Package-Requires: (baz "1.1.0") From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 16:58:37 2013 Received: (at 15108) by debbugs.gnu.org; 16 Aug 2013 20:58:37 +0000 Received: from localhost ([127.0.0.1]:35299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAR6S-000637-8E for submit@debbugs.gnu.org; Fri, 16 Aug 2013 16:58:36 -0400 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:40552) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VAR6L-00062o-K3 for 15108@debbugs.gnu.org; Fri, 16 Aug 2013 16:58:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=ifGyfjm3gBA92OjmZFhU/fVzVI6dmfOPSDqab1+iqXw=; b=nKLpFYg9t81E7PxKmgY9XugCKEG1Epm5BuXJgNONqRMqxIZaRWpYQwlAweuOi3q8gmMLNGnJVa3EpPWq8nK95xDClsHjtEX014XEqgjr2d6hjUzUljPrzeOezovuRSpmvEojLx4/+u2T9zUKXczLkAJo+3txoAWMlYZr/VYkuO0=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VAR6B-0002R2-Jb for 15108@debbugs.gnu.org; Fri, 16 Aug 2013 22:58:19 +0200 From: Tom Willemse To: 15108@debbugs.gnu.org Subject: More flexible package dependency specification Date: Fri, 16 Aug 2013 22:58:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 73537615 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) --=-=-= Content-Type: text/plain What would you think of the attached patch? It works for all the examples I sent earlier. Any comments, criticisms and considerations would be greatly appreciated. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=changelog.diff Content-Description: ChangeLog diff *** lisp/ChangeLog 2013-08-16 22:53:18.590328000 +0200 --- lisp/ChangeLog.new 2013-08-16 22:45:04.548991805 +0200 *************** *** 1,3 **** --- 1,11 ---- + 2013-08-16 Tom Willemse + + * emacs-lisp/package.el (package--prepare-dependencies): New + function. + (package-buffer-info): Call `package--prepare-dependencies' on the + list contained in the package-requires header to make dependency + specification a little more flexible. + 2013-08-16 Lars Magne Ingebrigtsen * net/shr.el (shr-rescale-image): Use ImageMagick even for GIFs --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=package.diff Content-Description: package.el diff *** lisp/emacs-lisp/package.el 2013-08-16 22:53:18.590328000 +0200 --- lisp/emacs-lisp/package.el.new 2013-08-16 22:52:51.479137603 +0200 *************** *** 973,978 **** --- 973,989 ---- str) (error nil)))) + (defun package--prepare-dependencies (deps) + "Turn DEPS into an acceptable list of dependencies. + + Any parts missing a version string get a default version string + of \"0\" (meaning any version) and an appropriate level of lists + is wrapped around any parts requiring it." + (cond + ((symbolp deps) `((,deps "0"))) + ((stringp (cadr deps)) `(,deps)) + (t (mapcar (lambda (dep) (if (symbolp dep) `(,dep "0") dep)) deps)))) + (defun package-buffer-info () "Return a `package-desc' describing the package in the current buffer. *************** *** 1003,1009 **** "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc ! (if requires-str (package-read-from-string requires-str)) :kind 'single)))) (declare-function tar-get-file-descriptor "tar-mode" (file)) --- 1014,1022 ---- "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc ! (if requires-str ! (package--prepare-dependencies ! (package-read-from-string requires-str))) :kind 'single)))) (declare-function tar-get-file-descriptor "tar-mode" (file)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 15:30:10 2013 Received: (at 15108) by debbugs.gnu.org; 11 Dec 2013 20:30:10 +0000 Received: from localhost ([127.0.0.1]:44281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqqQ5-0001LJ-5I for submit@debbugs.gnu.org; Wed, 11 Dec 2013 15:30:09 -0500 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:46551) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqqQ0-0001KL-JB for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 15:30:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=tzeZDf1tuA8UEkxcykCtsl6ChjU49Z2V+EL5346xolo=; b=ek+GKVEs38tlfO/Q4Z0HYyGIdP9yJvr8Z503gADDq5JPLuwS5rbSd3+VZqAq9H1pFIK89TIWLLIOKdeBS67gRkDFIkNLj+HISv2R0HDpQ7JxYkdi4UBo+cVHH/3cKGxM0ISD9J6fNOVwmxp3GTgf7PMZhrDCQpuidVkf8puV1BA=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VqqPv-0000jL-4g for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 21:29:59 +0100 From: Tom Willemse To: 15108@debbugs.gnu.org Subject: bug#15108: [Patch] Updated package dependencies Date: Wed, 11 Dec 2013 21:29:58 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 96229801 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) --=-=-= Content-Type: text/plain Hey, I've been meaning to send this for a couple of weeks, but I was unable to. I apologize. A while ago the patch I sent last time broke, I fixed it and now here I'm sending it again, hoping there is still some interest in this or need for it. I've removed the changes to the ChangeLog (or at least, I'm not sending them again), since I've lost confidence in it being my place to do so. I've tested it most recently bzr trunk revision 115470. All the ways to specify dependencies work as described before: ;; Package-Requires: foo ;; Package-Requires: (foo bar) ;; Package-Requires: (foo (baz "1.1.0") bar) ;; Package-Requires: (baz "1.1.0") These would all be valid after this patch. As before, any comments, criticisms and considerations would be greatly appreciated. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=pkgdep.patch Content-Description: Package dependency patch === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-08-03 02:34:22 +0000 +++ lisp/emacs-lisp/package.el 2013-08-16 20:40:09 +0000 @@ -973,6 +973,17 @@ str) (error nil)))) +(defun package--prepare-dependencies (deps) + "Turn DEPS into an acceptable list of dependencies. + +Any parts missing a version string get a default version string +of \"0\" (meaning any version) and an appropriate level of lists +is wrapped around any parts requiring it." + (cond + ((symbolp deps) `((,deps "0"))) + ((stringp (cadr deps)) `(,deps)) + (t (mapcar (lambda (dep) (if (symbolp dep) `(,dep "0") dep)) deps)))) + (defun package-buffer-info () "Return a `package-desc' describing the package in the current buffer. @@ -1003,7 +1014,9 @@ "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc - (if requires-str (package-read-from-string requires-str)) + (if requires-str + (package--prepare-dependencies + (package-read-from-string requires-str))) :kind 'single :url homepage)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 15:52:19 2013 Received: (at 15108) by debbugs.gnu.org; 11 Dec 2013 20:52:19 +0000 Received: from localhost ([127.0.0.1]:44309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqqlW-0001sx-Dy for submit@debbugs.gnu.org; Wed, 11 Dec 2013 15:52:18 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:35619) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqqlT-0001so-MU for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 15:52:16 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rBBKqDjM018645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 11 Dec 2013 20:52:13 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBBKqAel021920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Dec 2013 20:52:12 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBBKqA2q017761; Wed, 11 Dec 2013 20:52:10 GMT MIME-Version: 1.0 Message-ID: <9e976905-41bb-428c-afe3-ef2cf0673aa7@default> Date: Wed, 11 Dec 2013 12:52:10 -0800 (PST) From: Drew Adams To: Tom Willemse , 15108@debbugs.gnu.org Subject: RE: bug#15108: [Patch] Updated package dependencies References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 15108 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.5 (--) > I've tested it most recently bzr trunk revision 115470. All the ways to > specify dependencies work as described before: >=20 > ;; Package-Requires: foo > ;; Package-Requires: (foo bar) > ;; Package-Requires: (foo (baz "1.1.0") bar) > ;; Package-Requires: (baz "1.1.0") Those are not all of the ways. Most of my libraries use this way: ;; Package-Requires: () And most of the others (of mine) use this way (perhaps covered by your 3rd, perhaps not, depending on your spec): ;; Package-Requires: ((fit-frame "0")) See also bug #14941 (still unanswered, so far). From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 16:24:16 2013 Received: (at 15108) by debbugs.gnu.org; 11 Dec 2013 21:24:16 +0000 Received: from localhost ([127.0.0.1]:44336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqrGQ-0002e4-TG for submit@debbugs.gnu.org; Wed, 11 Dec 2013 16:24:15 -0500 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:37631) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqrGN-0002dv-Ra for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 16:24:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=M2+5K7hfVCTh9eiG96wh781PquisPmi5M1pSyRDpzTk=; b=gc+jQp326bB2BxXufl45n7LocJFD8GRU8NnFDCSsL69JU0/OnRHdpJH2b1RkI7AHfuXDfOL46tWNGzSgvFXMHYBm1QK8CAK4s90QDc9cc4HYTt83EqTsSQjEdfX3/M4PIEDmDxzwuRScvmg471OqGCd1o3affjFoMSPp6Gig/V4=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VqrGG-00053R-Q5; Wed, 11 Dec 2013 22:24:04 +0100 From: Tom Willemse To: Drew Adams Subject: Re: bug#15108: Updated package dependencies References: <9e976905-41bb-428c-afe3-ef2cf0673aa7@default> Date: Wed, 11 Dec 2013 22:24:04 +0100 In-Reply-To: <9e976905-41bb-428c-afe3-ef2cf0673aa7@default> (Drew Adams's message of "Wed, 11 Dec 2013 12:52:10 -0800 (PST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-alwaysdata-ID: 96236299 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Hey Drew, Drew Adams writes: >> I've tested it most recently bzr trunk revision 115470. All the ways to >> specify dependencies work as described before: >> >> ;; Package-Requires: foo >> ;; Package-Requires: (foo bar) >> ;; Package-Requires: (foo (baz "1.1.0") bar) >> ;; Package-Requires: (baz "1.1.0") > > Those are not all of the ways. Most of my libraries use this way: Sorry, bad choice of words, never meant to say all the ways work, I meant all the ways given in a previous mail. > ;; Package-Requires: () This will cause a dependency on `((nil (0)))' right now, I will fix that. May I ask why you wouldn't just leave the header out of the file or leave it empty? Just out of curiosity, this should work the same way as Emacs 24.3 I'm sure. > And most of the others (of mine) use this way (perhaps covered by > your 3rd, perhaps not, depending on your spec): > > ;; Package-Requires: ((fit-frame "0")) This produces a dependency on `((fit-frame (0)))' with my patch installed, according to `package-buffer-info'. > See also bug #14941 (still unanswered, so far). I will look at it, if you don't mind. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 16:57:15 2013 Received: (at 15108) by debbugs.gnu.org; 11 Dec 2013 21:57:15 +0000 Received: from localhost ([127.0.0.1]:44351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqrmM-0003Ss-Ih for submit@debbugs.gnu.org; Wed, 11 Dec 2013 16:57:14 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:48654) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VqrmK-0003Sj-1e for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 16:57:12 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rBBLv8bN032382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 11 Dec 2013 21:57:10 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBBLv7ii027065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Dec 2013 21:57:08 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rBBLv6GM013297; Wed, 11 Dec 2013 21:57:06 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 11 Dec 2013 13:57:06 -0800 (PST) From: Drew Adams To: Tom Willemse Subject: RE: bug#15108: Updated package dependencies References: <9e976905-41bb-428c-afe3-ef2cf0673aa7@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.5 (--) > > ;; Package-Requires: () >=20 > This will cause a dependency on `((nil (0)))' right now, I will fix > that. May I ask why you wouldn't just leave the header out of the file > or leave it empty? Just out of curiosity, this should work the same way > as Emacs 24.3 I'm sure. >From correspondence with people at MELPA, `Package-Requires' seems to be required. And being present with an empty list tells human readers that the package has no dependencies. (If absent, you don't get that explicit info, and you might be wrong in assuming it.) > > And most of the others (of mine) use this way (perhaps covered by > > your 3rd, perhaps not, depending on your spec): > > > > ;; Package-Requires: ((fit-frame "0")) >=20 > This produces a dependency on `((fit-frame (0)))' with my patch > installed, according to `package-buffer-info'. It should mean that the library in which it is found requires library `fit-frame', and any version of `fit-frame' is sufficient. (Any real version # is >=3D 0.) Dunno what that syntax with 0 instead of "0" is. Is is supported? Does it mean something different from ((fit-frame "0"))? > > See also bug #14941 (still unanswered, so far). >=20 > I will look at it, if you don't mind. Thx. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 11 17:52:32 2013 Received: (at 15108) by debbugs.gnu.org; 11 Dec 2013 22:52:32 +0000 Received: from localhost ([127.0.0.1]:44369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vqsdr-0004pF-GX for submit@debbugs.gnu.org; Wed, 11 Dec 2013 17:52:31 -0500 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:57164) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vqsdo-0004p6-Fn for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 17:52:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:To:From; bh=JOmK+tYF7wfn5X+kKtkkDdXsdgmgqL7dsJIwBQ/KpDU=; b=mv6HRjoBaEC+hZ7MU+YT+MVQfYxjiQtBBFDLBkGjZuRZmhMBy5tdoXWJJnoSS4UQG4w/WKhqGBy3iQjh4SAUl1rfX7a5DOKq4Rmos+dSI4yv55UMDxghqcF37WCaTQ9N8XQ8PybK8Nzn42jxFOvwM1CDWmAFr6CCvEAvqH4xnvU=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1Vqsdh-0004Tw-Az for 15108@debbugs.gnu.org; Wed, 11 Dec 2013 23:52:21 +0100 From: Tom Willemse To: 15108@debbugs.gnu.org Subject: bug#15108: [Patch] Updated package dependencies, again References: <9e976905-41bb-428c-afe3-ef2cf0673aa7@default> Date: Wed, 11 Dec 2013 23:52:20 +0100 In-Reply-To: (Drew Adams's message of "Wed, 11 Dec 2013 13:57:06 -0800 (PST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 96246555 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) --=-=-= Content-Type: text/plain Hey, Another update of my patch. Fixes two cases the last one missed or messed up: ;; Package-Requires: () ;; Package-Requires: ((foo)) The first is the same as not specifying any `Package-Requires' or leaving it empty. The second is the equivalent of any one of: ;; Package-Requires: foo ;; Package-Requires: (foo) ;; Package-Requires: ((foo "0")) Any other situations I might have to take into consideration? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=pkgdep.patch Content-Description: Updated Package dependency patch === modified file 'lisp/emacs-lisp/package.el' *** lisp/emacs-lisp/package.el 2013-12-11 21:15:12 +0000 --- lisp/emacs-lisp/package.el 2013-12-11 22:29:35 +0000 *************** *** 1104,1109 **** --- 1104,1124 ---- (declare-function lm-homepage "lisp-mnt" (&optional file)) + (defun package--prepare-dependencies (deps) + "Turn DEPS into an acceptable list of dependencies. + + Any parts missing a version string get a default version string + of \"0\" (meaning any version) and an appropriate level of lists + is wrapped around any parts requiring it." + (cond + ((null deps) nil) + ((symbolp deps) `((,deps "0"))) + ((stringp (cadr deps)) `(,deps)) + ((and (listp deps) (listp (car deps)) + (null (cdar deps))) + `((,(caar deps) "0"))) + (t (mapcar (lambda (dep) (if (symbolp dep) `(,dep "0") dep)) deps)))) + (defun package-buffer-info () "Return a `package-desc' describing the package in the current buffer. *************** *** 1135,1141 **** "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc ! (if requires-str (package-read-from-string requires-str)) :kind 'single :url homepage)))) --- 1150,1158 ---- "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc ! (if requires-str ! (package--prepare-dependencies ! (package-read-from-string requires-str))) :kind 'single :url homepage)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 13:30:25 2013 Received: (at 15108) by debbugs.gnu.org; 12 Dec 2013 18:30:25 +0000 Received: from localhost ([127.0.0.1]:46064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrB1j-0003K9-8v for submit@debbugs.gnu.org; Thu, 12 Dec 2013 13:30:23 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:43923) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrB1d-0003Jo-9G for 15108@debbugs.gnu.org; Thu, 12 Dec 2013 13:30:18 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id rBCIUDgv000649; Thu, 12 Dec 2013 13:30:14 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 2BBCEAE350; Thu, 12 Dec 2013 13:30:14 -0500 (EST) From: Stefan Monnier To: Tom Willemse Subject: Re: bug#15108: [Patch] Updated package dependencies Message-ID: References: Date: Thu, 12 Dec 2013 13:30:14 -0500 In-Reply-To: (Tom Willemse's message of "Wed, 11 Dec 2013 21:29:58 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4790=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4790> : inlines <316> : streams <1089724> : uri <1622043> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (-) > I've tested it most recently bzr trunk revision 115470. All the ways to > specify dependencies work as described before: Looks good, just one nitpick: > ;; Package-Requires: foo > ;; Package-Requires: (foo bar) > ;; Package-Requires: (foo (baz "1.1.0") bar) > ;; Package-Requires: (baz "1.1.0") Please don't support the first form nor the last form, since it otherwise gives the impression that ;; Package-Requires: foo bar baz or ;; Package-Requires: (foo "0.1") (bar "2.0") will also work and we don't want to go that way. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 14:24:09 2013 Received: (at 15108) by debbugs.gnu.org; 12 Dec 2013 19:24:09 +0000 Received: from localhost ([127.0.0.1]:46091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrBrk-0004eV-Uf for submit@debbugs.gnu.org; Thu, 12 Dec 2013 14:24:09 -0500 Received: from r0.smtpout1.alwaysdata.com ([176.31.58.0]:54127) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrBrh-0004eM-KO for 15108@debbugs.gnu.org; Thu, 12 Dec 2013 14:24:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alwaysdata.net; s=ryuslash; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=0BJ1e8bcCU58B1n8HsStuT5OmoEFKVMZTT96ppl/d0M=; b=ND9H2TEl/UQVzdlKK4a0kKCVNtJaZENhZ/4t0Nxe5G5UpkRuhN6UXHI9GCxuLXjJnR7n+g7wtZmb1CjpBn+e/LitVkPEUqa20P8693qgUyFxAI5hvzle1KecmgRI2J+O8rVZAHiYme3y2yHixrJQXAHsdTNDkPKNwx6+fmQlSYU=; Received: from 78-21-108-183.access.telenet.be ([78.21.108.183] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1VrBrb-0000uY-7C; Thu, 12 Dec 2013 20:23:59 +0100 From: Tom Willemse To: Stefan Monnier Subject: Re: bug#15108: [Patch] Updated package dependencies References: Date: Thu, 12 Dec 2013 20:23:58 +0100 In-Reply-To: (Stefan Monnier's message of "Thu, 12 Dec 2013 13:30:14 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-alwaysdata-ID: 96435447 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15108 Cc: 15108@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) --=-=-= Content-Type: text/plain Stefan Monnier writes: >> I've tested it most recently bzr trunk revision 115470. All the ways to >> specify dependencies work as described before: > > Looks good, just one nitpick: > >> ;; Package-Requires: foo >> ;; Package-Requires: (foo bar) >> ;; Package-Requires: (foo (baz "1.1.0") bar) >> ;; Package-Requires: (baz "1.1.0") > > Please don't support the first form nor the last form, since it > otherwise gives the impression that > > ;; Package-Requires: foo bar baz > or > ;; Package-Requires: (foo "0.1") (bar "2.0") > > will also work and we don't want to go that way. Taken care of in attached patch. I was unsure of how to deal with these situations, so I explicitly signal a (hopefully) clear error. Just letting it crash on trying to get the cdr of a symbol seemed messy. Please let me know what you think. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=pkgdep.patch Content-Description: Another patch === modified file 'lisp/emacs-lisp/package.el' *** lisp/emacs-lisp/package.el 2013-12-11 21:15:12 +0000 --- lisp/emacs-lisp/package.el 2013-12-12 19:13:00 +0000 *************** *** 1104,1109 **** --- 1104,1128 ---- (declare-function lm-homepage "lisp-mnt" (&optional file)) + (defun package--prepare-dependencies (deps) + "Turn DEPS into an acceptable list of dependencies. + + Any parts missing a version string get a default version string + of \"0\" (meaning any version) and an appropriate level of lists + is wrapped around any parts requiring it." + (cond + ((null deps) nil) + ((or (symbolp deps) + (and (listp deps) + (symbolp (car deps)) + (stringp (cadr deps)))) + (error "Invalid requirement specifier: %s" deps)) + ((stringp (cadr deps)) `(,deps)) + ((and (listp deps) (listp (car deps)) + (null (cdar deps))) + `((,(caar deps) "0"))) + (t (mapcar (lambda (dep) (if (symbolp dep) `(,dep "0") dep)) deps)))) + (defun package-buffer-info () "Return a `package-desc' describing the package in the current buffer. *************** *** 1135,1141 **** "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc ! (if requires-str (package-read-from-string requires-str)) :kind 'single :url homepage)))) --- 1154,1162 ---- "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc ! (if requires-str ! (package--prepare-dependencies ! (package-read-from-string requires-str))) :kind 'single :url homepage)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 14 20:08:39 2013 Received: (at 15108-done) by debbugs.gnu.org; 15 Dec 2013 01:08:39 +0000 Received: from localhost ([127.0.0.1]:50496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vs0CE-0007Ca-Vx for submit@debbugs.gnu.org; Sat, 14 Dec 2013 20:08:39 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:50961) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vs0CC-0007CS-V9 for 15108-done@debbugs.gnu.org; Sat, 14 Dec 2013 20:08:37 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.DIT.UMontreal.CA (8.14.1/8.14.1) with ESMTP id rBF18Xbp028648; Sat, 14 Dec 2013 20:08:34 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 7D82FAE358; Sat, 14 Dec 2013 20:08:32 -0500 (EST) From: Stefan Monnier To: Tom Willemse Subject: Re: bug#15108: [Patch] Updated package dependencies Message-ID: References: Date: Sat, 14 Dec 2013 20:08:32 -0500 In-Reply-To: (Tom Willemse's message of "Thu, 12 Dec 2013 20:23:58 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4792=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4792> : inlines <324> : streams <1090979> : uri <1624252> X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 15108-done Cc: 15108-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.8 (-) > Taken care of in attached patch. I was unsure of how to deal with these > situations, so I explicitly signal a (hopefully) clear error. Just > letting it crash on trying to get the cdr of a symbol seemed messy. > Please let me know what you think. Thanks, installed in trunk with a few changes, Stefan From unknown Fri Jun 20 07:16:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 12 Jan 2014 12:24:04 +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