apt fails if dbus is not running

Bug #432310 reported by renbag
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: aptdaemon

When running in a chroot environment in karmic I get the following error after using 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.debian.apt --type=signal /org/debian/apt org.debian.apt.CacheChanged'
E: Sub-process returned an error code

The bug is similar to this one:
https://bugs.launchpad.net/ubuntu/+source/packagekit/+bug/388623

To solve it I changed this line:

APT::Update::Post-Invoke-Success { "/usr/bin/dbus-send --system --dest=org.debian.apt --type=signal /org/debian/apt org.debian.apt.CacheChanged"; };

to

APT::Update::Post-Invoke-Success { "[ ! -f /var/run/dbus/system_bus_socket ] || /usr/bin/dbus-send --system --dest=org.debian.apt --type=signal /org/debian/apt org.debian.apt.CacheChanged"; };

in /etc/apt/apt.conf.d/20dbus

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

actually the test should be -S. This is an error in packagekit too. Thanks a lot. I fixed the bug upstream.

Changed in aptdaemon (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package aptdaemon - 0.10+bzr234-0ubuntu1

---------------
aptdaemon (0.10+bzr234-0ubuntu1) karmic; urgency=low

  * New upstream snapshot version:
    - less verbose debug (LP: #432937)
    - do not send dbus signal if dbus is not available (LP: #432310)
    - bugfixes
    - conffile handling
    - fix in progress code (LP #428964)
    - improvements in the logging

 -- Michael Vogt <email address hidden> Mon, 21 Sep 2009 18:01:09 +0200

Changed in aptdaemon (Ubuntu):
status: Fix Committed → Fix Released
Paul Sladen (sladen)
summary: - apt fails in a chroot environment if dbus is not running
+ apt fails if dbus is not running
Revision history for this message
Juancarlo An~ez (apalala) wrote :

-S gives an alike error. -f lets apt finish.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

This is still a bug. As Juanca noted, using -S does not solve the issue. I was trying to build the debian-installer, and the make always failed because of this exact issue. When I changed the -S to -f, apt-get started working again. I have reopened the bug as 'confirmed'.

Changed in aptdaemon (Ubuntu):
status: Fix Released → Confirmed
Changed in aptdaemon (Ubuntu):
status: Confirmed → Fix Committed
Changed in aptdaemon (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Paul Sladen (sladen) wrote :

Probably "|| true" at the would be preferable; the concern here is that D-Bus failings (be that not running, or nothing listening at the other end) should not result in apt failures with an incomplete package state.

Revision history for this message
Sebastian Heinlein (glatzor) wrote : Re: [Bug 432310] Re: apt fails if dbus is not running

Good point. I appended the ored true.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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