Bug 227717 - archivers/py-borgbackup:'msgpack-python<0.5.0,>=0.4.6' distribution was not found
Summary: archivers/py-borgbackup:'msgpack-python<0.5.0,>=0.4.6' distribution was not f...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
Depends on:
Reported: 2018-04-23 13:07 UTC by iron.udjin
Modified: 2018-04-24 19:48 UTC (History)
3 users (show)

See Also:
jjuanino: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description iron.udjin 2018-04-23 13:07:52 UTC
After update devel/py-msgpack to 0.5.6:

# borg
Traceback (most recent call last):
  File "/usr/local/bin/borg", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3088, in <module>
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 574, in _build_master
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'msgpack-python<0.5.0,>=0.4.6' distribution was not found and is required by borgbackup

I have a few version of msgpack installed:

# pkg info -q | grep msgpack
Comment 1 Jose G. Juanino 2018-04-23 17:43:38 UTC
Hi, thanks for the bug report.

Currently, 1.1.5 version requires msgpack-python >= 0.4.6 and < 0.5.0, as noted in 

I need to enforce this constraint in the Makefile port. I am to ask to ports@ and I let you know. Regards.
Comment 2 Po-Chuan Hsieh freebsd_committer 2018-04-23 18:15:42 UTC
Please try this. msgpack 0.5.6 should work.

Index: Makefile
--- Makefile    (revision 468109)
+++ Makefile    (working copy)
@@ -28,6 +28,9 @@
 USES=          python:3.4+ ssl
 USE_PYTHON=    autoplist distutils

+       @${REINPLACE_CMD} -e 's|msgpack-python>=0.4.6,<0.5.0|msgpack>=0.5.6|' ${WRKSRC}/setup.py ${WRKSRC}/src/borgbackup.egg-info/requires.txt
        @${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/borg/ -name "*.so" \
                -exec ${STRIP_CMD} {} \;
Comment 3 Jose G. Juanino 2018-04-23 18:36:32 UTC
Hi, I fully agree with this patch, as noted by borgbackup upstream (https://github.com/borgbackup/borg/issues/3753):

From the 0.5.x series, 0.5.6 looks good, but everything else looks too problematic / broken.

TODO: update requirements: 0.4.6, 0.4.7, 0.4.8, 0.5.6.

But we need also to enforce msgpack>=0.5.6 in the Makefile

Comment 4 iron.udjin 2018-04-24 00:32:56 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #2)

Patch fixed the problem. Thank you.
Comment 5 Po-Chuan Hsieh freebsd_committer 2018-04-24 19:48:19 UTC
Committed. Thanks!
Comment 6 commit-hook freebsd_committer 2018-04-24 19:48:25 UTC
A commit references this bug:

Author: sunpoet
Date: Tue Apr 24 19:47:26 UTC 2018
New revision: 468235
URL: https://svnweb.freebsd.org/changeset/ports/468235

  Fix msgpack dependency

  - Update RUN_DEPENDS
  - Bump PORTREVISION for package change

  Bump msgpack requirement to 0.5.6 which is the only acceptable 0.5.x version [1].

  PR:		227717
  Reported by:	<iron.udjin@gmail.com>
  Submitted by:	sunpoet (myself)
  Approved by:	Jose Garcia Juanino <jjuanino@gmail.com>
  Reference:	https://github.com/borgbackup/borg/issues/3753 [1]