Title: bdist_rpm fails if project contains files with spaces in the names
Type: Stage:
Components: Distutils Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, jaraco
Priority: normal Keywords:

Created on 2014-04-04 10:33 by jaraco, last changed 2014-04-05 12:04 by jaraco. This issue is now closed.

File name Uploaded Description Edit jaraco, 2014-04-04 11:00 jaraco, 2014-04-04 11:58 jaraco, 2014-04-05 12:04
Messages (6)
msg215508 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2014-04-04 10:33
In, Eduard reported an issue that setuptools fails to install due to files in its structure with spaces in the filenames. These files have been around for some time (over two years in Distribute), but are now revealing a limitation in bdist_rpm.

The aforementioned ticket demonstrates the issue, and I will be providing a script to replicate the failure shortly.
msg215509 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2014-04-04 11:00
The attached script ( replicates the failure in a Unix environment with the 'rpm' command present.
msg215513 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2014-04-04 11:58
I tried using the --install-script hook of the bdist_rpm command to update the INSTALLED_FILES listing to wrap them in quotes, but that doesn't help:

I also delved into the RPM docs, which don't provide any guidance other than to put one file per line.

I now believe that this is a bug in RPM and there's nothing that can be done in distutils to work around the issue.
msg215563 - (view) Author: √Čric Araujo (eric.araujo) * (Python committer) Date: 2014-04-04 21:04
Is this a duplicate of #809163 ?
msg215579 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2014-04-04 23:56
Yes. Exactly.
msg215596 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2014-04-05 12:04
My last version of the repo script would have worked had I coded it correctly. The line-by-line substitution was broken, not taking into account the newline character.

This new script demonstrates that quoting each file works - simply run the script with "--install-script install.txt".
Date User Action Args
2014-04-05 12:04:34jaracosetfiles: +

messages: + msg215596
2014-04-04 23:56:45jaracosetstatus: open -> closed
resolution: duplicate
messages: + msg215579
2014-04-04 21:04:48eric.araujosetmessages: + msg215563
2014-04-04 11:58:58jaracosetfiles: +

messages: + msg215513
2014-04-04 11:00:49jaracosetfiles: +

messages: + msg215509
2014-04-04 10:33:36jaracocreate