Upgrading in chroot fails as postinst calls invoke-rc.d
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dbus (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I'm trying to create an up-to-date chroot based on precise-updates. Since I don't know how to include updates while using debootstrap (see https:/
Setting up dbus (1.4.18-1ubuntu1.3) ...
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/
invoke-rc.d: initscript dbus, action "start" failed.
dpkg: error processing dbus (--configure):
subprocess installed post-installation script returned error exit status 1
Looking at the postinst script, I see this:
# If it's not running (perhaps we're in a chroot) this will just fail
# harmlessly, so there's no need to condition on status.
dbus-send … --system … > /dev/null || true
…
invoke-rc.d dbus start || exit $?
So someone did actually think about a chroot scenario, and the first error message about the missing system bus is indeed harmless. For the command that starts dbus, however, success is mandatory. This breaks the upgrade of dbus for me, and quite a number of packages which depend on it. It would be nice if the package could be installed in a chroot, without a local dbus instance running.
As a workaround, one can temporarily create a symlink called /sbin/invoke-rc.d pointing at /bin/true.
I've also been hit by this bug while debootstrap'ing a precise chroot image from a lucid box with:
debootstrap --arch amd64 --variant=buildd \ =main,universe, precise- updates, precise- security \ standard, ubuntu- minimal, linux-image- virtual, ssh,git, ruby1.9. 3 \ us-east- 1.ec2.archive. ubuntu. com/ubuntu/
--components
--include ubuntu-
precise /tmp/root/ http://
`apt-get -y upgrade` fails there for the same reason reported here.