guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Fix Borg crashes with Python msgpack > 0.5


From: Leo Famulari
Subject: 01/01: gnu: Fix Borg crashes with Python msgpack > 0.5
Date: Wed, 28 Feb 2018 23:44:25 -0500 (EST)

lfam pushed a commit to branch master
in repository guix.

commit acb59d99dbb8779ecf41cdbba45d2ce8ba88f5ed
Author: Leo Famulari <address@hidden>
Date:   Wed Feb 28 23:20:02 2018 -0500

    gnu: Fix Borg crashes with Python msgpack > 0.5
    
    The Python msgpack library changed its name, but borg (and possibly
    other packages) still uses the old name.
    
    Fixes <https://bugs.gnu.org/30662>.
    
    * gnu/packages/python.scm (python-msgpack-transitional): New variable.
    * gnu/packages/backup.scm (borg)[inputs]: Use it.
---
 gnu/packages/backup.scm |  5 ++++-
 gnu/packages/python.scm | 18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 48d4b08..2fafa2c 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -547,7 +547,10 @@ detection, and lossless compression.")
        ("lz4" ,lz4)
        ("openssl" ,openssl)
        ("python-llfuse" ,python-llfuse)
-       ("python-msgpack" ,python-msgpack)
+       ;; The Python msgpack library changed its name so Borg requires this
+       ;; transitional package for now:
+       ;; <https://bugs.gnu.org/30662>
+       ("python-msgpack" ,python-msgpack-transitional)
        ("zstd" ,zstd)))
     (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
     (description "Borg is a deduplicating backup program.  Optionally, it
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 064d790..69101c7 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5869,6 +5869,24 @@ reading and writing MessagePack data.")
     (home-page "https://pypi.python.org/pypi/msgpack/";)
     (license license:asl2.0)))
 
+;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
+;; release 0.5. Some packages like borg still call it by the old name for now.
+;; <https://bugs.gnu.org/30662>
+(define-public python-msgpack-transitional
+  (package
+    (inherit python-msgpack)
+    (arguments
+     (substitute-keyword-arguments (package-arguments python-msgpack)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'configure-transitional
+             (lambda _
+               ;; Keep using the old name.
+               (substitute* "setup.py"
+                 (("TRANSITIONAL = False")
+                   "TRANSITIONAL = 1"))
+               #t))))))))
+
 (define-public python2-msgpack
   (package-with-python2 python-msgpack))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]