Bug 445158 - PackageKit fails to install a package if there is space in the directory name
Summary: PackageKit fails to install a package if there is space in the directory name
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Robin Norwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-04 23:25 UTC by Dawid Pietrala
Modified: 2008-08-18 08:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-20 08:57:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dawid Pietrala 2008-05-04 23:25:55 UTC
Description of problem:

when i double click on the *.rpm file stored in a directory containing space in
its name, PackageKit fails to install it and it displays a message that it can't
install it. it takes only the first part of the directory name into account, e.g
~/Pobrane pliki. message: Can't install /home/<username>/Pobrane

Version-Release number of selected component (if applicable):

PackageKit-0.1.12-9.20080502.fc9.i386
PackageKit-libs-0.1.12-9.20080502.fc9.i386

Steps to Reproduce:
1. put any rpm file in a directory which name contains space
2. right-click on it
3. choose "Package installer"
4. enter your root password
5. read the error message

Comment 1 Luke Macken 2008-05-05 15:26:11 UTC
Something like this fixes it on the backend,

--- a/backends/yum/helpers/install-file.py
+++ b/backends/yum/helpers/install-file.py
@@ -15,7 +15,7 @@ import sys
 from yumBackend import PackageKitYumBackend
.
 trusted = sys.argv[1]
-file_to_inst = sys.argv[2]
+file_to_inst = ' '.join(sys.argv[2:])
 backend = PackageKitYumBackend(sys.argv[1:])
 backend.install_file(trusted, file_to_inst)
 sys.exit(0)

But the daemon should probably be passing us quoted paths.

Richard?

Comment 2 Richard Hughes 2008-05-05 16:12:11 UTC
Correct, the daemon should really be sending quoted paths - it already does the
right thing with argv, so I guess this should be fixed in the daemon pretty
trivially.

Comment 3 Richard Hughes 2008-05-05 21:02:28 UTC
Aye, I see the problem. Will fix tmw.

Comment 4 Richard Hughes 2008-05-06 08:16:13 UTC
Fixed in master, commitid a0a10e92526a4cdeb2235e88caaa1bd61f15f613

Comment 5 Dawid Pietrala 2008-05-06 08:30:07 UTC
thank you! have a nice day!

Comment 6 Richard Hughes 2008-05-06 09:38:25 UTC
There's rpm's here: http://koji.fedoraproject.org/koji/taskinfo?taskID=597384

Please can you test this please, and if it works then I'll push to updates. Thanks.

Comment 7 Dawid Pietrala 2008-05-06 10:41:52 UTC
it works fine now. however, as i wanted to test it thoroughly, i checked what
happens if i try to install a package which is already installed. PackageKit
displays a message which says:

Local install failed. Installing the local file failed. More information is
available in the detailed report.

When i opened More details:

Can't install /home/daf/Pobrane pliki/<package_name>.rpm

i know that it is already installed but shouldn't it be stated somewhere? 

yum localinstall displays the appropriate message.

Comment 8 Richard Hughes 2008-05-06 17:13:17 UTC
Thanks for verifying. The message with master (newer code) is much better. I'll
be pushing the new version into Fedora when it's stabilised a bit.

Comment 9 Dawid Pietrala 2008-05-06 20:50:15 UTC
all right, thank you!

Comment 10 Bug Zapper 2008-05-14 10:38:32 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Richard Hughes 2008-08-18 08:27:21 UTC
*** Bug 459358 has been marked as a duplicate of this bug. ***


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