Bug 250990 - rpm does not work with directories that contain spaces
rpm does not work with directories that contain spaces
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
: 217258 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-06 09:16 EDT by Till Maas
Modified: 2008-01-25 12:37 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-25 12:37:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Till Maas 2007-08-06 09:16:40 EDT
Description of problem:
When I am in the directory "~/devel/EPEL Groups" and want to extract
buildsys-macros-5-4.el5.noarch.rpm then I get this error:
$ rpmdev-extract buildsys-macros-5-4.el5.noarch.rpm 
error: open of /home/till/devel/EPEL failed: No such file or directory
error: open of /home/till/devel/EPEL failed: No such file or directory
mkdir: cannot create directory `': No such file or directory

Version-Release number of selected component (if applicable):
rpmdevtools-5.4-1.fc7

How reproducible:
always
Comment 1 Ville Skyttä 2007-08-06 09:50:20 EDT
Looks like a rpm bug to me:

$ mkdir -p "devel/EPEL Groups"
$ cd "devel/EPEL Groups"
$ wget -q
http://buildsys.fedoraproject.org/buildgroups/rhel5/i386/buildsys-macros-5-4.el5.noarch.rpm

$ rpm -qp --qf '%{NAME}-%{VERSION}-%{RELEASE}'
"$PWD/buildsys-macros-5-4.el5.noarch.rpm"
error: open of /home/scop/devel/EPEL failed: No such file or directory
error: open of /home/scop/devel/EPEL failed: No such file or directory

$ rpm -Uvh "$PWD/buildsys-macros-5-4.el5.noarch.rpm"
error: open of /home/scop/devel/EPEL failed: No such file or directory
error: open of Groups/buildsys-macros-5-4.el5.noarch.rpm failed: No such file or
directory

$ rpm -q rpm
rpm-4.4.2-46.fc7.x86_64

Also, the exit status of the failing "rpm -qp ..." command above is 0, so I
can't use that do detect failures in rpmdev-extract.  I think it should be
changed to indicate failure if there is one.
Comment 2 Panu Matilainen 2007-08-06 10:06:00 EDT
Mostly a dupe of bug #217258 but the incorrect exit status not mentioned there...
Comment 4 Red Hat Bugzilla 2007-08-21 01:35:36 EDT
User pnasrat@redhat.com's account has been closed
Comment 5 Panu Matilainen 2007-10-25 07:13:09 EDT
*** Bug 217258 has been marked as a duplicate of this bug. ***
Comment 6 Trevin Beattie 2008-01-19 09:55:39 EST
I was about to enter a new bug until I found this one.

I've just installed FC8 in a VMware instance to try it out.

Description of problem:
If I hand rpm a path to a package that has a space in the name, rpm treats it as
two arguments separated by the space instead of one, even though the space is
either escaped or quoted.

This was spotted on a VMware installation where the VMware Tools are mounted on
"/media/VMware Tools" by default.

Version-Release number of selected component (if applicable):
4.4.2.2-3.fc8, 4.4.2.2-7.fc8, 4.4.2-32 (fc6), and 4.4.2-37.el5

How reproducible:
Every time

Steps to Reproduce:
1. # touch '/tmp/test rpm-1.0-1.noarch.rpm'
2a. # rpm -ivh '/tmp/test rpm-1.0-1.noarch.rpm'
2b. # rpm -ivh /tmp/test\ rpm-1.0-1.noarch.rpm
  
Actual results:
error: open of /tmp/test failed: No such file or directory
error: open of rpm-1.0-1.noarch.rpm failed: No such file or directory

Expected results:
/tmp/test rpm-1.0-1.noarch.rpm: not an rpm package (or package manifest):

Additional info:
I can confirm that this bug also exists on Fedora Core 6 and Red Hat Enterprise
Linux 5 (at work).
Comment 7 Trevin Beattie 2008-01-19 10:02:01 EST
This is a very old bug -- I can also confirm that it existed on RHEL 3
(rpm-4.2.3-30_nonptl).
Comment 8 Panu Matilainen 2008-01-25 12:37:29 EST
Fixed in 4.4.2.3-0.1.rc1:

[pmatilai@localhost ~]$ rpm -qp --qf "%{name} %{version}\n" ~/"dir with
spaces"/SRPMS/*
file 4.21
popt 1.12

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