From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: package updater: operate on package structs, not names? Date: Tue, 1 Dec 2015 18:36:38 +0100 Message-ID: <20151201173638.GA3925@debian> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3orG-0006I5-1U for guix-devel@gnu.org; Tue, 01 Dec 2015 12:36:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3orA-0005Pz-Fp for guix-devel@gnu.org; Tue, 01 Dec 2015 12:36:53 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:51981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3orA-0005PG-5v for guix-devel@gnu.org; Tue, 01 Dec 2015 12:36:48 -0500 Content-Disposition: inline In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: "guix-devel@gnu.org" On Tue, Dec 01, 2015 at 11:41:25AM +0100, Ricardo Wurmus wrote: > There are two ways to approach this: we change the Guix package names to > closely match those of the upstream packages, or we pass the complete > package structure to ‘latest-release’. The latter approach would allow > the CRAN updater to extract the appropriate name from the tarball URI. I think we should work on the package, or more concretely, the uri and the version. Then we should do some pattern matching to find occurrences of major-minor-patchlevel, major-minor or major versions in the uri. And then we should try +1 in each of them (with later components set to 0). For instance with qt: (version "5.5.1") (uri (string-append "http://download.qt.io/official_releases/qt/" (version-major+minor version) "/" version "/single/qt-everywhere-opensource-src-" version ".tar.xz")) which expands to http://download.qt.io/official_releases/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.xz we should try http://download.qt.io/official_releases/qt/5.5/5.5.2/single/qt-everywhere-opensource-src-5.5.2.tar.xz http://download.qt.io/official_releases/qt/5.6/5.6.0/single/qt-everywhere-opensource-src-5.6.0.tar.xz http://download.qt.io/official_releases/qt/6.0/6.0.0/single/qt-everywhere-opensource-src-6.6.0.tar.xz (and maybe some recursion to find the latest version). What do you think? Andreas