Quoting Ludovic Courtès (2014-10-19 16:24:17)
> Ian Denhardt skribis:
>
> > How about this: separate it out into to functions: version-prefix, which
> > is the same as what I have now, but takes a (mandatory) argument
> > specifying the number of fields, and feature-version, which is defined
> >
Ian Denhardt skribis:
> How about this: separate it out into to functions: version-prefix, which
> is the same as what I have now, but takes a (mandatory) argument
> specifying the number of fields, and feature-version, which is defined
> like:
>
> (define (feature-version version) (version-p
Quoting John Darrington (2014-10-19 03:40:36)
> It seems likely to me, that sometime we'll need the number of fields to be
> parameterised,
> instead of hard coded at 2 (for example lynx has a directory component with
> 3 fields in its URL)
>
> Also I don't understand the significnace of the na
Mark H Weaver skribis:
> l...@gnu.org (Ludovic Courtès) writes:
>
>> John Darrington skribis:
>>
>>> How about something like (string-take-fields "1.22.3.04.5" 3) which would
>>> return "1.22.3"
>>
>> Agreed. What ‘version-prefix’, with the optional argument defaulting
>> to 2?
>
> I also like
Ian Denhardt writes:
> diff --git a/guix/utils.scm b/guix/utils.scm
> index 6392914..a179f6b 100644
> --- a/guix/utils.scm
> +++ b/guix/utils.scm
> @@ -2,6 +2,7 @@
> ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès
> ;;; Copyright © 2013 Mark H Weaver
> ;;; Copyright © 2014 Eric Bavier
> +;
l...@gnu.org (Ludovic Courtès) writes:
> John Darrington skribis:
>
>> How about something like (string-take-fields "1.22.3.04.5" 3) which would
>> return "1.22.3"
>
> Agreed. What ‘version-prefix’, with the optional argument defaulting
> to 2?
I also like 'version-prefix', although I'd favor
John Darrington skribis:
> On Sat, Oct 18, 2014 at 10:03:42PM -0400, Ian Denhardt wrote:
Thanks, Ian, for working on it!
[...]
> +(define (version-take-api version-string)
> + "Return \".\", where major and minor are the major and
> +minor version numbers from version-string."
On Sat, Oct 18, 2014 at 10:03:42PM -0400, Ian Denhardt wrote:
The procedure version-take-api extracts the "major.minor" part of
version strings; previously this was handled by an expression common to
several packages.
diff --git a/guix/utils.scm b/guix/utils.scm
index
The procedure version-take-api extracts the "major.minor" part of
version strings; previously this was handled by an expression common to
several packages.
* guix/utils.scm (version-take-api): New procedure
* gnu/packages/backup.scm (duplicity): Use version-take-api.
* gnu/packages/cmake.scm (cmak