Don't fail if dbus is not running

Bug #388623 reported by Michael Biebl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Fix Released
Medium
James Westby

Bug Description

If dbus is not running (e.g. in my karmic chroot environment), I get this nasty error message on each apt operation:

# apt-get update
...
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
E: Problem executing scripts APT::Update::Post-Invoke-Success '/usr/bin/dbus-send --system --dest=org.freedesktop.PackageKit --type=method_call /org/freedesktop/PackageKit org.freedesktop.PackageKit.StateHasChanged string:'cache-update''
E: Sub-process returned an error code

A simple fix is, to check if dbus is running in /etc/apt/apt.conf.d/20packagekit, before doing the dbus call

Trivial patch is attached

Related branches

Revision history for this message
Michael Biebl (mbiebl) wrote :
Revision history for this message
James Westby (james-w) wrote :

Hi,

Thanks for the patch, I'll try and include this in the next upload.

Thanks,

James

Changed in packagekit (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → James Westby (james-w)
Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I've got exact the same issue since todays update in karmic, but also on "normal" environment...

Revision history for this message
Schmirrwurst (schmirrwurst) wrote : apport-collect data

Architecture: amd64
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: binfmt_misc input_polldev joydev sbp2 lp parport pcmcia snd_hda_intel snd_pcm_oss snd_mixer_oss uvcvideo snd_pcm compat_ioctl32 snd_timer tifm_7xx1 psmouse snd soundcore yenta_socket rsrc_nonstatic pcmcia_core videodev v4l1_compat tifm_core video intel_agp iTCO_wdt iTCO_vendor_support serio_raw pcspkr sony_laptop snd_page_alloc nvidia output ohci1394 ieee1394 sky2 fbcon tileblit font bitblit softcursor
Package: packagekit 0.4.8-0ubuntu3 [modified: var/lib/PackageKit/transactions.db]
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 LANGUAGE=
ProcVersionSignature: Ubuntu 2.6.28-13.44-generic
Uname: Linux 2.6.28-13-generic x86_64
UserGroups:

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :
tags: added: apport-collected
Changed in packagekit (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package packagekit - 0.4.9+20090825-0ubuntu1

---------------
packagekit (0.4.9+20090825-0ubuntu1) karmic; urgency=low

  * New upstream snapshot provding a lot of APT backend improvements:
    - Allow to install updates which require the installation of additional
      packages. Updates depending on the removal of a package are still
      blocked (LP: #342671, LP: #374011, LP: #374011)
    - Warn about the installation of untrusted package (LP: #256245)
    - Don't crash in APT post update hook if system D-Bus daemon isn't
      running (LP: #388623)
    - Don't try to estimate a download progress during cache updating, since
      APT reports only a forth- and backwards running progress. (LP: #348053)
    - Support for python-apt 0.7.12 (LP: #415993)
    - Translated package descriptions
  * debian/patches:
    - Remove ignore_packages_in_conffile (Merged upstream)
    - Remove fix_typo (Merged upstream)
    - Add fix_unicode: Handle the encoding messages via stdin/stdout correctly
      (LP: #396513)
    - Add fix_unicode_debfile: Convert the path of the local file which
      should be installed to the correct encoding (LP: #347327)
  * debian/libpackagekit-qt-dev.install: Fix install location of CMake module.
    Thanks to Sveinung Kvilhaugsvik (LP: #345706)
  * debian/control: Fix spelling of Qt. Thanks to Sveinung Kvilhaugsvik
    (LP: #378419)

 -- Sebastian Heinlein <email address hidden> Tue, 25 Aug 2009 13:03:26 +0200

Changed in packagekit (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.