Bug 456094 - gpk-install-file can't handle gvfs (sftp) mounts
Summary: gpk-install-file can't handle gvfs (sftp) mounts
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-packagekit
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Robin Norwood
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-21 14:35 UTC by Jón Fairbairn
Modified: 2008-08-06 10:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-08-06 10:20:42 UTC
Type: ---

Attachments (Terms of Use)
new UI (15.99 KB, image/png)
2008-07-28 15:13 UTC, Richard Hughes
no flags Details

Description Jón Fairbairn 2008-07-21 14:35:29 UTC
Description of problem:
gpk-install-file .gvfs/sftp\ on\ calligramme\${blah}
complains that the file in question doesn't exist.

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

How reproducible:

Steps to Reproduce:

1. mount an sftp location with gvfs
2. run gpk-install-file .gvfs/${whatever}
Actual results:
dbox pops up saying
No such file './gvfs/${whatever}'

Expected results:
Same results as if the file is copied to the local machine and gpk-install-file
run on that.

Additional info:

Same effect happens if gvfs location is opened in nautilus
and gpk-install-file opened from nautilus.

Comment 1 Richard Hughes 2008-07-27 10:12:21 UTC
Can you try with the gpk-install-local-file with gnome-packagekit 0.2.x in
updates-testing please? Thanks.

Comment 2 Jón Fairbairn 2008-07-27 15:14:38 UTC
Installing gnome-packagekit 0.2.3-7.fc9.i386 from testing seems to make things
unhappy.  gpk-install-local-file .gvfs/$whatever
   failed to install file 
   failed to get a TID: Incorrect path with ';' returned!
for which the details are: "failed to get a TID: Incorrect path with ';' returned!"

But this also happens with gpk-update-icon: 
   Getting update lists failed
   Failed to get updates
for which the details are again "failed to get a TID: Incorrect path with ';'

Comment 3 Jón Fairbairn 2008-07-27 15:28:36 UTC
A reboot removed the above problem (presumably updating the package didn't
restart enough services?)

However, gpk-install-local-file .gvfs/$whatever
gives details
No such file '/home/jf/.gvfs/sftp on

$ file .gvfs/sftp\ on\
.gvfs/sftp on
RPM v3 bin i386 exmh-2.7.2-1

Comment 4 Richard Hughes 2008-07-28 11:41:48 UTC
Sure, we need to schedule a reboot when we've updated PackageKit between major
versions. I've also managed to reproduce the bug you are seeing.

What's happening is that gpk-install-local-file is running as your user, say uid
500. packagekitd is running as root, uid 0.

When you mount using gvfs, you actually do a FUSE mount. The fuse mount creates
virtual files with the permissions [-rw------- 500:500] i.e accessable by user
500 or anyone in the group 500 -- but nobody else. This includes root.

Because this is a FUSE mount, we can't do something like chmod o+r ${file} as it
won't let us do that.

The only way around this would be to copy the file somewhere like
~/.PackageKit/temp (or /tmp?) and then execute the method on this new path.

Comment 5 Richard Hughes 2008-07-28 15:13:47 UTC
Created attachment 312782 [details]
new UI

What do you think of the wording here?

Comment 6 Jón Fairbairn 2008-07-28 22:29:32 UTC
Pretty good, though "Do you want to copy this file?" suggests that it might be
you that has to do the copying.  Perhaps "Do you want $packagekit-component to
copy this file?" or something similar ("Allow $packagekit-component to copy this
file?"?) would resolve that ambiguity.

Comment 7 Richard Hughes 2008-08-06 10:20:42 UTC
Cool, I'll get one of the UI people here at Red Hat to have a look at it. I'll close this next release, and you can pick up the changes either in rawhide or when I backport the next major version of PackageKit into F9. Thanks.

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