Bug 102453

Summary: rpm does not accept filenames with spaces in them
Product: [Retired] Red Hat Linux Reporter: Tim Landscheidt <tim>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DEFERRED QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: leonard-rh-bugzilla, mitr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-20 17:40:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Landscheidt 2003-08-15 12:17:44 UTC
rpm does not accept filenames with spaces in them: 
 
| [root@lockfix ~]# ls -l u\ .i386.rpm; rpm -qip u\ .i386.rpm; rpm -q rpm 
| -rw-rw-r--    1 root     root       140108 15. Aug 10:29 u .i386.rpm 
| Fehler: open of u failed: Datei oder Verzeichnis nicht gefunden 
| rpm-4.2-0.69 
 
Notice though: 
 
| [root@lockfix ~]# rpm -Fvh u\ .i386.rpm 
| Fehler: open of u failed: Datei oder Verzeichnis nicht gefunden 
| Fehler: open of .i386.rpm failed: Datei oder Verzeichnis nicht gefunden 
 
(Filename gets handled as two.) 
 
I stumbled upon this while handling RPMs in a directory with a space in its 
name but the error occurs also if the space is only in the base name. 
 
The root of the problem may lie in popt but I did not dive into that. 
 
(Obvious) workaround: Rename the RPM and everything's fine.

Comment 1 Jeff Johnson 2003-08-20 17:40:10 UTC
Spaces in file names from the command line? That's too pathological
a problem case for me to consider fixing, there's bigger problems,
like rpm can/will permit glob characters in the output package file name,
that are at least as important.

Defferred until somewhen.

Comment 2 Leonard den Ottolander 2004-02-11 03:07:26 UTC
I also encountered this issue with the midnight commander (bug
#114542) in Fedora Core.

$ rpm -qp 'a b/SysVinit-2.85-5.i386.rpm'
error: open of a failed: No such file or directory
$ rpm -qp 'a\ b/SysVinit-2.85-5.i386.rpm'
warning: a b/SysVinit-2.85-5.i386.rpm: V3 DSA signature: NOKEY, key ID
897da07a
SysVinit-2.85-5


Comment 3 Leonard den Ottolander 2004-02-11 03:09:08 UTC
*** Bug 114542 has been marked as a duplicate of this bug. ***