Bug 456094

Summary: gpk-install-file can't handle gvfs (sftp) mounts
Product: [Fedora] Fedora Reporter: Jón Fairbairn <jon.fairbairn>
Component: gnome-packagekitAssignee: Robin Norwood <robin.norwood>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: mclasen, rhughes, richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-06 10:20:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
new UI none

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):
gnome-packagekit-0.1.12-12.20080430.fc9.i386

How reproducible:
Always

Steps to Reproduce:

1. mount an sftp location with gvfs
2. run gpk-install-file .gvfs/${whatever}
3.
  
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
gives 
   failed to install file 
   failed to get a TID: Incorrect path with &apos;;&apos; 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 ';'
returned!"



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
calligramme/local/scratch/home/jf/unbacked/RPMS/Random/exmh-2.7.2-1.noarch.rpm'

FWIW:
$ file .gvfs/sftp\ on\
calligramme/local/scratch/home/jf/unbacked/RPMS/Random/exmh-2.7.2-1.noarch.rpm
.gvfs/sftp on
calligramme/local/scratch/home/jf/unbacked/RPMS/Random/exmh-2.7.2-1.noarch.rpm:
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.