GNU bug report logs -
#29629
[PATCH] Add version-major helper, and switch to using it.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Sat, 9 Dec 2017 20:52:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 29629 <at> debbugs.gnu.org (full text, mbox):
From: nee <nee.git <at> 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
This bug report was last modified 7 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.