[issue809163] Can't add files with spaces under bdist_rpm

Jason R. Coombs report at bugs.python.org
Sat Apr 5 14:52:14 CEST 2014


Jason R. Coombs added the comment:

I decided to test my proposition. It seems that simply specifying / for %files leads to the RPM including parent directories. Here's the output I get when running my test with the sed workaround:

$ rpm -q -filesbypkg -p dist/issue21153-package-0.0.0-1.noarch.rpm
issue21153-package        /usr/local/lib/python2.7/dist-packages/issue21153_package-0.0.0.egg-info
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/__init__.py
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/__init__.pyc
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/__init__.pyo
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/file with spaces.py
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/file with spaces.pyc
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/file with spaces.pyo

If instead I apply the no-record patch (attached), I can run bdist_rpm (not using sed workaround) without errors, but the resulting RPM has more directories specified:

$ rpm -q -filesbypkg -p dist/issue21153-package-0.0.0-1.noarch.rpm
issue21153-package        /
issue21153-package        /usr
issue21153-package        /usr/local
issue21153-package        /usr/local/lib
issue21153-package        /usr/local/lib/python2.7
issue21153-package        /usr/local/lib/python2.7/dist-packages
issue21153-package        /usr/local/lib/python2.7/dist-packages/issue21153_package-0.0.0.egg-info
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/__init__.py
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/__init__.pyc
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/__init__.pyo
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/file with spaces.py
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/file with spaces.pyc
issue21153-package        /usr/local/lib/python2.7/dist-packages/pkg/file with spaces.pyo

Perhaps that's acceptable. If it is, it makes the code simpler and cleaner.

Can someone comment on the impact of the presence of those parent directories in the RPM?

----------
Added file: http://bugs.python.org/file34737/issue809163-no-record.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue809163>
_______________________________________


More information about the Python-bugs-list mailing list