Bug 456094 - gpk-install-file can't handle gvfs (sftp) mounts
gpk-install-file can't handle gvfs (sftp) mounts
Product: Fedora
Classification: Fedora
Component: gnome-packagekit (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Robin Norwood
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-07-21 10:35 EDT by Jón Fairbairn
Modified: 2008-08-06 06:20 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-08-06 06:20:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Jón Fairbairn 2008-07-21 10:35:29 EDT
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 06:12:21 EDT
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 11:14:38 EDT
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 11:28:36 EDT
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 07:41:48 EDT
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 11:13:47 EDT
Created attachment 312782 [details]
new UI

What do you think of the wording here?
Comment 6 Jón Fairbairn 2008-07-28 18:29:32 EDT
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 06:20:42 EDT
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.