Bug 1372461 - The bodhi client does not work unless the server is installed
Summary: The bodhi client does not work unless the server is installed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bodhi
Version: rawhide
Hardware: All
OS: Linux
urgent
high
Target Milestone: ---
Assignee: Randy Barlow
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-01 19:00 UTC by Randy Barlow
Modified: 2016-09-19 17:41 UTC (History)
5 users (show)

Fixed In Version: bodhi-2.2.0-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 17:41:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-infra bodhi issues 900 0 None closed Reorganize locations of client and server code 2020-11-18 19:21:17 UTC

Description Randy Barlow 2016-09-01 19:00:31 UTC
Description of problem:
The bodhi client fails to run if bodhi-server is not installed, as it is missing the Python distribution that gets installed by the server package.


Version-Release number of selected component (if applicable):
bodhi-client-2.1.8-1.fc26.noarch


How reproducible:
Every time.


Steps to Reproduce:
0. Install bodhi-client but not bodhi-server.
1. $ bodhi


Actual results:
$ bodhi
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2958, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2944, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2971, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'bodhi==2.1.8' distribution was not found and is required by the application


Expected results:
bodhi-client should function without the server installed.

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-09-01 20:20:09 UTC
> I think I will add a bodhi-common package that will own the distribution bits, which should allow bodhi-client to be installed independently of the server.

The package with the python module should be called python2-bodhi, since it's a normal shared python module. That's what the packaging guidelines specify for names, and also there won't be a conflict when python3-bodhi is added later on.

Comment 2 Randy Barlow 2016-09-02 13:25:52 UTC
Hello Zbigniew, I had actually been calling it python2-bodhi-common in my spec file while working on this, but I like your suggestion better. Thanks!

Comment 3 Fabio Alessandro Locati 2016-09-02 13:27:29 UTC
Fedora naming standard for python packages is:

source: python-%{pypi_name}
py2 bin: python2-%{pypi_name}
py3 bin: python3-%{pypi_name}

Comment 4 Randy Barlow 2016-09-02 15:41:04 UTC
I tried to fix this in the spec file, but I came to realize that bodhi/__init__.py contains server code, which makes it impossible to put that file in the python2-bodhi package without pulling in all of the server. Due to this, I've decided to fix this upstream by reorganizing the code.


Note You need to log in before you can comment on or make changes to this bug.