all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 29629@debbugs.gnu.org
Subject: [bug#29629] [PATCH 1/2] guix: utils: Add version-major.
Date: Sat,  9 Dec 2017 21:16:49 +0000	[thread overview]
Message-ID: <20171209211650.12619-1-mail@cbaines.net> (raw)
In-Reply-To: <877etv7hgn.fsf@cbaines.net>

From: nee <nee.git@cock.li>

* guix/utils.scm (version-major): New procedure.
---
 guix/utils.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index fed31f4ca..92e45de61 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -82,6 +82,7 @@
             version>=?
             version-prefix
             version-major+minor
+            version-major
             guile-version>?
             string-replace-substring
             arguments-from-environment-variable
@@ -497,6 +498,10 @@ For example, (version-prefix \"2.1.47.4.23\" 3) returns \"2.1.47\""
 minor version numbers from version-string."
   (version-prefix version-string 2))
 
+(define (version-major version-string)
+  "Return the major version number as string from the version-string."
+  (version-prefix version-string 1))
+
 (define (version>? a b)
   "Return #t when A denotes a version strictly newer than B."
   (eq? '> (version-compare a b)))
-- 
2.15.1

  reply	other threads:[~2017-12-09 21:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 20:51 [bug#29629] [PATCH] Add version-major helper, and switch to using it Christopher Baines
2017-12-09 21:16 ` Christopher Baines [this message]
2017-12-09 21:16   ` [bug#29629] [PATCH 2/2] gnu: Switch to using the version-major procedure Christopher Baines
2017-12-11 15:51     ` Ludovic Courtès
2017-12-11 19:15       ` bug#29629: " Christopher Baines
2017-12-11 15:50   ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171209211650.12619-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=29629@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.