Bug 500237 - gpk-install-local-file doesn't continue running as root when told to
Summary: gpk-install-local-file doesn't continue running as root when told to
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-11 20:53 UTC by Mads Kiilerich
Modified: 2009-06-16 02:23 UTC (History)
4 users (show)

Fixed In Version: 2.27.2-1.fc11
Clone Of:
Environment:
Last Closed: 2009-05-11 21:17:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mads Kiilerich 2009-05-11 20:53:56 UTC
Description of problem:

When a user somehow ends up running gpk-install-local-file as root then it pops up and warns "Local file installer is running as a privileged user" and asks if it should continue running. But no matter if Cancel or Continue Anyway is chosen then it cancels.

I would expect that when it has the option to continue then it should do that.

(And the prompt has no main window, so it isn't possible to navigate to it with the keyboard...)


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

gnome-packagekit-2.27.2-0.2.20090414git.fc11.i586

Comment 1 Richard Hughes 2009-05-11 21:17:46 UTC
I'm guessing if you log in as root, it works, but not with sudo. If you do "sudo gpk-install-local-file /home/hughsie/moo.rpm --verbose" then you get:

TI:22:11:54	TH:0x90654c0	FI:gpk-install-local-file.c	FN:main,122
 - The name org.freedesktop.PackageKit was not provided by any .service files

This means that the service is not running as the user root, which of course is the right thing to do. If you do sudo gpk-update-icon and then sudo gpk-install-local-file, then it might work, although this isn't a very good idea.

You've got to remember that running PolicyKit clients under uid 0 or using sudo isn't a great plan at all. I'm not really surprised it doesn't work correctly.

Comment 2 Mads Kiilerich 2009-05-12 21:13:32 UTC
Ok. I'm beginning to grok what is going on, and I have almost accepted that it shouldn't work in this case.

BUT the current user experirence in this case is bad. A fatal error message shouldn't be hidden behind a --verbose flag. Because it is a gui app it should even pop up as a messagebox.

The current message is probably absolutely correct, but for users (like me) who doesn't understand the concept .desktop files and the runtime model (DBUS?) it isn't very helpful. I would suggest a message box saying "Fatal error: Could not connect to PackageKit service". That would have sufficient for me in the situation.

Comment 3 Richard Hughes 2009-05-13 07:52:56 UTC
(In reply to comment #2)
> BUT the current user experirence in this case is bad. A fatal error message
> shouldn't be hidden behind a --verbose flag. Because it is a gui app it should
> even pop up as a messagebox.

commit 255bc16adabce0bc74ec1802036b79ec2cf2a1bc
Author: Richard Hughes <richard>
Date:   Wed May 13 08:51:29 2009 +0100

    Pop up a modal dialog if any of the methods in gpk-install-foo fail. Fixes rh#500237
    I agree, hiding the error behind a --verbose switch is bad form.

Comment 4 Fedora Update System 2009-06-01 10:57:10 UTC
gnome-packagekit-2.27.2-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gnome-packagekit-2.27.2-1.fc11

Comment 5 Fedora Update System 2009-06-16 02:22:38 UTC
gnome-packagekit-2.27.2-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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