Bug 260670 - pkg built from devel/py-importlib-resources installs as v0.0.0, not 5.4.0
Summary: pkg built from devel/py-importlib-resources installs as v0.0.0, not 5.4.0
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
URL:
Keywords: easy, needs-patch
: 260671 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-24 22:58 UTC by hartzell
Modified: 2022-01-11 20:36 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hartzell 2021-12-24 22:58:51 UTC
TL;DR -- I used pourdriere to build a bunch of packages and ended up with a package for py-importlib-resources that thinks it is v0.0.0 instead of v5.4.0.

Help?  Thanks!

---

I have a system that is 

  - built from packages that
  - I build using poudriere
  - and portshaker, which blends in my port for zettarepl

I hadn't updated recently.

Today I stood up a new pkg builder using 12.3 and ran my various ansible playbooks to set it up.

I built all of my packages and used them to update my system.

When I try to run zettarepl I get the following crash.

```
% /usr/local/bin/zettarepl
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 568, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 886, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (importlib-resources 0.0.0 (/usr/local/lib/python3.8/site-packages), Requirement.parse('importlib_resources>=1.4.0'), {'jsonschema'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/zettarepl", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    def _initialize_master_working_set():
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3255, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 570, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'importlib_resources>=1.4.0' distribution was not found and is required by jsonschema
```

When I look in /usr/local/lib/python3.8/site-packages on the updated system it seems that importlib_resources thinks that its version number is 0.0.0.

   importlib_resources-0.0.0-py3.8.egg-info

I've poked around a bit but I'm not sure where my build went off the rails.

I'd welcome solutions or clues for where to look.

**Thanks!**
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-12-25 09:47:04 UTC
*** Bug 260671 has been marked as a duplicate of this bug. ***
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-01-11 19:07:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d39f84e8e399636a94ffe898949b142bf373de42

commit d39f84e8e399636a94ffe898949b142bf373de42
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-01-11 17:49:07 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-01-11 18:47:52 +0000

    devel/py-importlib-resources: Partially revert BUILD_DEPENDS change in 9698ad19e0c450f2c05184e308e0aee262c4a827

    - Bump PORTREVISION for package change

    PR:             260670
    Reported by:    <hartzell@alerce.com>

 devel/py-importlib-resources/Makefile | 3 +++
 1 file changed, 3 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-01-11 19:40:52 UTC
A commit in branch 2022Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4943db134e7ac6b560bdfd4eaa6ae23a02a1ded3

commit 4943db134e7ac6b560bdfd4eaa6ae23a02a1ded3
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-01-11 17:49:07 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-01-11 19:40:04 +0000

    devel/py-importlib-resources: Partially revert BUILD_DEPENDS change in 9698ad19e0c450f2c05184e308e0aee262c4a827

    - Bump PORTREVISION for package change

    PR:             260670
    Reported by:    <hartzell@alerce.com>

    (cherry picked from commit d39f84e8e399636a94ffe898949b142bf373de42)

 devel/py-importlib-resources/Makefile | 3 +++
 1 file changed, 3 insertions(+)
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-01-11 20:35:20 UTC
Committed. Thanks!
Comment 6 hartzell 2022-01-11 20:36:44 UTC
Thanks all!