Bug 23149 - pk-command-not-found is chatty when dbus isn't running
Summary: pk-command-not-found is chatty when dbus isn't running
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-05 07:41 UTC by Adam Jackson
Modified: 2009-08-06 02:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Jackson 2009-08-05 07:41:52 UTC
chrooting into a livecd image and running a nonexistant command gives:

[root@synephrine /]# nm
Command not found. 
** ERROR **: This program cannot start until you start the dbus system service.
aborting...
Trace/breakpoint trap

This is a bit misleading, since starting dbus isn't going to make nm suddenly start working.  It also doesn't match the normal bash not-found message, but meh.

Cheesy workaround is to hack the alias like so:

command_not_found_handle () {
    [ -S /var/run/dbus/system_bus_socket ] && /usr/libexec/pk-command-not-found $1 || (echo "bash: $1: command not found" ; return 127; )
}

but then you have to repeat that for tcsh and so on.  Better would be to have pk-c-n-f do the check itself.
Comment 1 Richard Hughes 2009-08-06 02:08:17 UTC
commit c52a26de0ab484b6fc0d53d82acfcbaf9a5c1936
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Aug 6 10:06:54 2009 +0100

    cnf: don't run the helper script when dbus is not running. Fixes fd#23149


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.