Bug #12034
ceph-common needs python-argparse on older distros, but doesn't require it
0%
Description
The ceph command-line utility is a Python script that does import argparse
- on Python 2.7 this is fine, because argparse
is included in core. This is not the case, however, in Python 2.6 which is used e.g. in CentOS 6.
I tried bringing up a vanilla CentOS 6.6 docker image and installed only ceph-common on it. The result is as expected:
[root@9412bea8532a ~]# ceph Traceback (most recent call last): File "/usr/bin/ceph", line 64, in <module> import argparse ImportError: No module named argparse
Related issues
Associated revisions
ceph.spec.in: python-argparse only in Python 2.6
argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.
Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.
Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.
Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.
argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.
http://tracker.ceph.com/issues/12034 Fixes: #12034
Signed-off-by: Nathan Cutler <ncutler@suse.com>
ceph.spec.in: python-argparse only in Python 2.6
argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.
Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.
Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.
Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.
argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.
http://tracker.ceph.com/issues/12034 Fixes: #12034
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 23171c952997d104cfa6b5700ec0bb658a8e0915)
Conflicts:
ceph.spec.in
ceph.spec.in: python-argparse only in Python 2.6
argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.
Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.
Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.
Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.
argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.
http://tracker.ceph.com/issues/12034 Fixes: #12034
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 23171c952997d104cfa6b5700ec0bb658a8e0915)
History
#1 Updated by Nathan Cutler almost 6 years ago
#2 Updated by Kefu Chai almost 6 years ago
- Status changed from New to Fix Under Review
- Source changed from other to Community (dev)
#3 Updated by Nathan Cutler almost 6 years ago
- Status changed from Fix Under Review to New
- Assignee changed from Nathan Cutler to Ken Dreyer
- Source changed from Community (dev) to other
#4 Updated by Nathan Cutler almost 6 years ago
- Status changed from New to Fix Under Review
- Source changed from other to Community (dev)
#5 Updated by Nathan Cutler almost 6 years ago
- Status changed from Fix Under Review to Pending Backport
#6 Updated by Nathan Cutler over 5 years ago
- Status changed from Pending Backport to Resolved