unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#29629] [PATCH] Add version-major helper, and switch to using it.
@ 2017-12-09 20:51 Christopher Baines
  2017-12-09 21:16 ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Christopher Baines
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Baines @ 2017-12-09 20:51 UTC (permalink / raw)
  To: 29629

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]


This is part of #28769, with some of my changes on top.

Christopher Baines (1):
  gnu: Switch to using the version-major procedure.

nee (1):
  guix: utils: Add version-major.

 gnu/packages/audio.scm          | 2 +-
 gnu/packages/bioinformatics.scm | 2 +-
 gnu/packages/messaging.scm      | 2 +-
 gnu/packages/statistics.scm     | 2 +-
 guix/utils.scm                  | 5 +++++
 5 files changed, 9 insertions(+), 4 deletions(-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#29629] [PATCH 1/2] guix: utils: Add version-major.
  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
  2017-12-09 21:16   ` [bug#29629] [PATCH 2/2] gnu: Switch to using the version-major procedure Christopher Baines
  2017-12-11 15:50   ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Christopher Baines @ 2017-12-09 21:16 UTC (permalink / raw)
  To: 29629

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#29629] [PATCH 2/2] gnu: Switch to using the version-major procedure.
  2017-12-09 21:16 ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Christopher Baines
@ 2017-12-09 21:16   ` Christopher Baines
  2017-12-11 15:51     ` Ludovic Courtès
  2017-12-11 15:50   ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Christopher Baines @ 2017-12-09 21:16 UTC (permalink / raw)
  To: 29629

* gnu/packages/audio.scm (ardour)[arguments]: Switch to using version-major.
  (hmmer)[source]: Switch to using version-major.
  (pidgin)[native-search-paths]: Switch to using version-major.
  (r-minimal)[source]: Switch to using version-major.
---
 gnu/packages/audio.scm          | 2 +-
 gnu/packages/bioinformatics.scm | 2 +-
 gnu/packages/messaging.scm      | 2 +-
 gnu/packages/statistics.scm     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 4f6e4a409..b0c3eca0c 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -222,7 +222,7 @@ namespace ARDOUR { const char* revision = \"" version "\" ; }")))))
        (modify-phases %standard-phases
          (add-after
           'unpack 'set-rpath-in-LDFLAGS
-          ,(ardour-rpath-phase (version-prefix version 1))))
+          ,(ardour-rpath-phase (version-major version))))
        #:test-target "test"
        #:python ,python-2))
     (inputs
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 171b13d0d..f81db2c84 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2917,7 +2917,7 @@ indexing scheme is called a @dfn{Hierarchical Graph FM index} (HGFM).")
        (method url-fetch)
        (uri (string-append
              "http://eddylab.org/software/hmmer"
-             (version-prefix version 1) "/"
+             (version-major version) "/"
              version "/hmmer-" version ".tar.gz"))
        (sha256
         (base32
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 9525c9f5d..1780536d0 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -387,7 +387,7 @@ authentication.")
      (list (search-path-specification
             (variable "PURPLE_PLUGIN_PATH")
             (files (list (string-append "lib/purple-"
-                                        (version-prefix version 1))
+                                        (version-major version))
                          "lib/pidgin")))))
     (home-page "http://www.pidgin.im/")
     (synopsis "Graphical multi-protocol instant messaging client")
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index fc18719f3..5e356a3b6 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -114,7 +114,7 @@ be output in text, PostScript, PDF or HTML.")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cran/src/base/R-"
-                                  (version-prefix version 1) "/R-"
+                                  (version-major version) "/R-"
                                   version ".tar.gz"))
               (sha256
                (base32
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#29629] [PATCH 1/2] guix: utils: Add version-major.
  2017-12-09 21:16 ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Christopher Baines
  2017-12-09 21:16   ` [bug#29629] [PATCH 2/2] gnu: Switch to using the version-major procedure Christopher Baines
@ 2017-12-11 15:50   ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2017-12-11 15:50 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 29629

Christopher Baines <mail@cbaines.net> skribis:

> From: nee <nee.git@cock.li>
>
> * guix/utils.scm (version-major): New procedure.

OK!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#29629] [PATCH 2/2] gnu: Switch to using the version-major procedure.
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2017-12-11 15:51 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 29629

Christopher Baines <mail@cbaines.net> skribis:

> * gnu/packages/audio.scm (ardour)[arguments]: Switch to using version-major.
>   (hmmer)[source]: Switch to using version-major.
>   (pidgin)[native-search-paths]: Switch to using version-major.
>   (r-minimal)[source]: Switch to using version-major.

LGTM, thanks!

Ludo'.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#29629: [PATCH 2/2] gnu: Switch to using the version-major procedure.
  2017-12-11 15:51     ` Ludovic Courtès
@ 2017-12-11 19:15       ` Christopher Baines
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Baines @ 2017-12-11 19:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29629-done

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Christopher Baines <mail@cbaines.net> skribis:
>
>> * gnu/packages/audio.scm (ardour)[arguments]: Switch to using version-major.
>>   (hmmer)[source]: Switch to using version-major.
>>   (pidgin)[native-search-paths]: Switch to using version-major.
>>   (r-minimal)[source]: Switch to using version-major.
>
> LGTM, thanks!

Great, I've pushed this now.

Thanks for reviewing :)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-11 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-09 20:51 [bug#29629] [PATCH] Add version-major helper, and switch to using it Christopher Baines
2017-12-09 21:16 ` [bug#29629] [PATCH 1/2] guix: utils: Add version-major Christopher Baines
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).