From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Allowing rolling release packages on ELPA Date: Wed, 26 Oct 2022 18:31:43 +0000 Message-ID: <87czaev3lc.fsf@posteo.net> References: <87o7u4p2t4.fsf@posteo.net> <87sfjbrt6h.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21495"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 26 20:34:33 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onlEW-0005Ir-27 for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Oct 2022 20:34:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onlBy-0004z3-HY; Wed, 26 Oct 2022 14:31:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onlBt-0004iO-Ff for emacs-devel@gnu.org; Wed, 26 Oct 2022 14:31:49 -0400 Original-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 1onlBr-0002gR-LC for emacs-devel@gnu.org; Wed, 26 Oct 2022 14:31:49 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8A6AB240028 for ; Wed, 26 Oct 2022 20:31:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666809105; bh=Zx4zkmqugeQk8pnp6nFwLlUl4L5Q5+6cMZF5iAql/Jc=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=Xo+PLHaBNl+NImo0o6CSSju46pyDmwMoDaABt5BRpx93rjnDhetMRGV+p+tfPgEfr zDJaw8DCtN6aE0CAnmpTeFY3GpyhoCnLJM3IR8hr6l3xyrYqjCT8Y+7vNJRJu10SEJ nTXOnb2Aok7Wi4ewKrl13/OxHKQHx3JAu+4nlXxgKlemlAlJgoht0xiMG12rV2z7f3 pzN8B5QHKjZveWEEGhjD1mcOh9quCU9/V4JoQIFMVV8bnxgJttaCL0sfkTSXPd792M uNFwROqZ4VqhGns2IztIWddEo3pBoUvpzAjxENkKfUUS2m6V0D80bw9RFyahOShXw3 ZUEzoA9fAj1kQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MyHTC638Sz9rxN; Wed, 26 Oct 2022 20:31:43 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Wed, 26 Oct 2022 07:57:01 -0400") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298564 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: >>> More importantly, it would be good to notice when that flag is out of >>> date, i.e. signal an error if the `Version:` has changed when that flag >>> is set. Maybe simply require that flag to be set to a string (rather >>> than just `t`) which is the expected version specified in `Version:` and >>> then signal an error if they don't agree? >> >> Sure, that can be done but I don't see why? > > Because more often than I'd like, upstream management changes without us > being made aware of them. So especially for discouraged flags, we should > make extra sure that these flags are still desired. How does this look like: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-support-for-rolling-release-packages.patch >From 6f746b919d3a377cf8ef0f9aa34ebbf9969b0188 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 16 Oct 2022 18:05:40 +0200 Subject: [PATCH] Add support for rolling-release packages * README: Document :rolling-release * elpa-admin.el (elpaa--get-release-revision): Respect :rolling-release. (elpaa--make-one-package): Respect :rolling-release. --- README | 11 ++++++++++- elpa-admin.el | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README b/README index 4ff305047a..1c42f13cd7 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ #+TITLE: ELPA-Admin README -#+DATE: 2022-01-06 +#+DATE: 2022-10-26 Copyright (C) 2010-2022 Free Software Foundation, Inc. \\ See the end of the file for license conditions. @@ -168,6 +168,15 @@ this ORIG-VERSION (or REMAPPED-VERSION if non-nil) to override the default heuristic which uses the last revision that modified the "Version:" header. +** =:rolling-release FLAG= +If FLAG is non-nil, a new package will be released for every new +commit, instead of just on incrementing the "Version" header. FLAG +can optionally be a string, in which case the package is only released +if the version is equal to FLAG. + +Note that the usage of this option is discouraged. Only use it if the +package maintainer explicitly wishes to use a "rolling release" model. + * Configuration (elpa-config) The configuration file is a `lisp-data-mode` file containing diff --git a/elpa-admin.el b/elpa-admin.el index a1eec9c448..7ed78430d6 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -194,6 +194,7 @@ commit which modified the \"Version:\" pseudo header." (not (member vers (car version-map)))) (pop version-map)) (or (nth 2 (car version-map)) + (and (elpaa--spec-get pkg-spec :rolling-release) "HEAD") ;; When the mainfile is a symlink (e.g. for :core packages), run Git ;; in the directory that holds the actual file, otherwise Git won't ;; know what file we're talking about. @@ -945,7 +946,8 @@ place the resulting tarball into the file named TARBALL-ONLY." dir pkg-spec `(nil ,devel-vers . ,(nthcdr 2 metadata)) - nil tarball-only)))) + nil tarball-only))) + (rolling-release (elpaa--spec-get pkg-spec :rolling-release))) ;; Try and build the latest release tarball. (cond @@ -972,7 +974,13 @@ place the resulting tarball into the file named TARBALL-ONLY." tarball dir pkg-spec metadata (lambda () (cdr last-rel))) (elpaa--release-email pkg-spec metadata dir))))))) + ((and (stringp rolling-release) + (not (version= rolling-release vers))) + (elpaa--message "Expected version %s, but got %s for package %s!" + rolling-release vers pkgname)) (t + (when rolling-release + (setq vers devel-vers)) (let ((tarball (concat elpaa--release-subdir (format "%s-%s.tar" pkgname vers)))) (when (elpaa--make-one-tarball -- 2.38.0 --=-=-=--