[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package updater: operate on package structs, not names?
From: |
Andreas Enge |
Subject: |
Re: package updater: operate on package structs, not names? |
Date: |
Tue, 1 Dec 2015 18:36:38 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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