Bug 862333

Summary: Type '$' at the command line and get an internal dbus error message
Product: [Fedora] Fedora Reporter: Stef Walter <stefw>
Component: PackageKitAssignee: Richard Hughes <hughsient>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: hughsient, jonathan, rhughes, rvitale, smparrish
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-03 14:42:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stef Walter 2012-10-02 16:37:44 UTC
Description of problem:

When I type '$' at the command line I get a dbus error message:

[stef@stef-redhat realmd]$ $
bash: $: command not found...
Failed to search for file: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code14: Invalid input passed to daemon: char '$' in text!

First of all we shouldn't be complaining about errors in the text, secondly the GDBus error needs to unfortunately get passed through g_dbus_strip_remote_error(). 

Should I split these issues into separate bugs?

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

Name        : PackageKit
Arch        : x86_64
Version     : 0.8.4
Release     : 1.fc18

How reproducible:

Every time

Expected results:

bash: $: command not found
(ie: no other error message)

Additional info:

Comment 1 Stef Walter 2012-10-02 16:40:44 UTC
Also see: https://bugzilla.gnome.org/show_bug.cgi?id=684969

Comment 2 Richard Hughes 2012-10-03 13:28:56 UTC
I'm looking at this now.

Comment 3 Richard Hughes 2012-10-03 14:42:39 UTC
commit ce2676e06bd5cdaaeb3b42821a3708ad8302c369
Author: Richard Hughes <richard>
Date:   Wed Oct 3 15:43:47 2012 +0100

    cnf: Ignore InvalidInput errors from the daemon
    
    This can happen when the user does something like:
    
    [hughsie@hughsie-work ~]$ $
    bash: $: command not found...
    
    Resolves the second half of https://bugzilla.redhat.com/show_bug.cgi?id=862333

:100644 100644 f1bcd4e... cfce7f4... M  contrib/command-not-found/pk-command-not-found.c

commit bc32841ec449977a690f5228ff21d3f1c3faa524
Author: Richard Hughes <richard>
Date:   Wed Oct 3 15:41:58 2012 +0100

    Use g_dbus_error_get_remote_error() rather than just looking at the prefix

:100644 100644 1a55757... 79ea801... M  lib/packagekit-glib2/pk-client.c

commit 3e55483748381452cfadcfce3c46afb4d5680d6d
Author: Richard Hughes <richard>
Date:   Wed Oct 3 15:37:11 2012 +0100

    Correctly register remote transaction DBus errors
    
    This prevents sending a remote error like:
    GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code14

:100644 100644 196fbfb... 5dfc2ec... M  src/pk-transaction.c
:100644 100644 9ebf750... d7de55b... M  src/pk-transaction.h

commit 65987ab3ff29b3ea4a59575eb27e3d33b4754951
Author: Richard Hughes <richard>
Date:   Wed Oct 3 14:36:32 2012 +0100

    glib: Ensure remote error is stripped before showing it to the user
    
    This prevents showing the user errors like:
    
    GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_5ftransaction_5ferror.Code14
    
    Resolves half of https://bugzilla.redhat.com/show_bug.cgi?id=862333