Bug 151621 - RPMs fail to install with spaces in the directory name
RPMs fail to install with spaces in the directory name
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: system-config-packages (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
: EasyFix
: 76936 163416 176311 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-20 18:31 EST by James Hall
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-06 16:58:39 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 James Hall 2005-03-20 18:31:55 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2

Description of problem:
RPMs cannot be installed from a directory with a space in its name.

Version-Release number of selected component (if applicable):
rpm-4.3.2-21 nautilus-2.8.1-4

How reproducible:
Always

Steps to Reproduce:
1. Open nautilus
2. Make a new folder with a space in it, i.e. "My Downloads"
3. Move an RPM into the folder and double click it
  

Actual Results:  Produces the following error message:

Could Not Open Package

The file "/home/rio/My" could not be read.  Make sure that you have the proper permissions on it

Expected Results:  The package should have been loaded.

Additional info:
Comment 1 rudolf kastl 2005-03-21 20:39:04 EST
tried it out and can confirm that.
Comment 2 James Hall 2005-04-25 13:43:18 EDT
Executing the following command as root user and non-privalidged user has the
following effect:

1. Open Terminal
2. type "system-install-packages /home/rio/My\
Downloads/AdobeReader_enu-7.0.0-1.i386.rpm"
3. Produces the error described above
4. su -
5. type "system-install-packages /home/rio/My\
Downloads/AdobeReader_enu-7.0.0-1.i386.rpm"
6. Behaves as expected

Therefore I imagine it could be a problem with the way system-auth passes
arguments. Will do more testing soon.
Comment 3 Miloslav Trmač 2005-06-12 15:40:08 EDT
*** Bug 76936 has been marked as a duplicate of this bug. ***
Comment 4 Felipe Contreras 2005-06-12 16:34:11 EDT
I can reproduce this bug.

The fix is to change /usr/sbin/system-install-packages, instead of sending $* we
should send "$@".

system-config-packages seems to have this problem too and probably some others.

However rpm still doesn't handle paths with spaces.

Comment 5 James Hall 2005-06-18 17:35:16 EDT
Problem still present in FC4
Comment 6 David Zeuthen 2005-06-22 13:56:56 EDT
Reassigning to package owner.
Comment 7 Jeremy Katz 2005-09-21 16:03:03 EDT
*** Bug 163416 has been marked as a duplicate of this bug. ***
Comment 8 Ignacio Vazquez-Abrams 2005-12-21 04:40:49 EST
*** Bug 176311 has been marked as a duplicate of this bug. ***
Comment 9 Felipe Contreras 2005-12-21 11:10:47 EST
I don't get it, I already told you the fix, why don't you fix it?

It is the right way to do it, if you don't believe me you can check the bash
manual; we want "$@".

*
Expands to the positional parameters, starting from one. When the expansion
occurs within double quotes, it expands to  a  single word  with  the value of
each parameter separated by the first character of the IFS special variable.
That is, "$*" is equivalent to "$1c$2c...", where c is the first character of
the value of the IFS variable. If IFS is unset, the parameters are separated by
spaces. If IFS is null, the parameters are joined without intervening separators.

@
Expands  to  the positional parameters, starting from one. When the expansion
occurs within double quotes, each parameter expands to a separate word. That is,
"$@" is equivalent to "$1" "$2" ... When there are no positional parameters,
"$@" and $@ expand  to nothing (i.e., they are removed).
Comment 10 James Hall 2005-12-21 12:09:07 EST
Felipe Contreras,

Looks like the package owner doesn't have enough time to sort this out, so if
you could post a patch that would be great. I'd love to see this easily fixable
bug I reported 9 months ago get wrapped up.
Comment 11 Tejas Dinkar 2006-01-11 08:25:25 EST
I really don't see why a patch is needed....

Here is what /usr/sbin/system-install-packages looks like:

exec python /usr/share/system-config-packages/SinglePackageWindow.py $*

Here is what it should look like:

exec python /usr/share/system-config-packages/SinglePackageWindow.py "$@"

There is only one line in the file

The Patch of: Felipe Contreras works in this case
Comment 12 Tejas Dinkar 2006-01-11 08:33:40 EST
There is also one more thing I noted while trying this out:

RPM will not accept files with spaces in the path like so:
rpm -Uvh /home/tejas/My\ Downloads/gobby-0.2.2-6.fc4.i386.rpm

as other programs do.

However, rpm WILL accept the rpm if the \ is ALSO escaped. Hense, rpm WILL
install the package like this:
rpm -Uvh /home/tejas/My\\\ Downloads/gobby-0.2.2-6.fc4.i386.rpm

I don't think this should be patched here, however, and I'll post this up as an
RPM bug as well
Comment 13 Felipe Contreras 2006-01-11 12:26:02 EST
Yes, there are two bugs, one is system-install-packages not handling spaces, and
another is rpm not handling spaces well.

I purposed a fix for system-install-packages, probably that is the way we should
be doing it, and the same thing happens for other scripts.

However the fix for rpm is something else.
Comment 14 Jeremy Katz 2006-02-06 16:58:39 EST
This should be handled better in the system-install-packages from pirut.

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