[lucid] libvirt-bin fails to install (sed: can't read /etc/apparmor.d/usr.bin.virt-aa-helper)

Bug #493582 reported by Thierry Carrez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Jamie Strandboge
Lucid
Fix Released
High
Jamie Strandboge

Bug Description

Installing libvirt-bin on lucid, either manually or through the UEC/NC ISO installer, fails with:

Setting up libvirt-bin (0.7.2-4ubuntu3) ...
Adding group `libvirtd' (GID 114) ...
Done.
sed: can't read /etc/apparmor.d/usr.bin.virt-aa-helper: No such file or directory
dpkg: error processing libvirt-bin (--configure):
 subprocess installed post-installation script returned error exit status 2

Related branches

Revision history for this message
Thierry Carrez (ttx) wrote :

I think the following postinst snippet should check for -n $2 before comparing, so that it doesn't fail in the "first install" case:

--
old_profile="/etc/apparmor.d/usr.bin.virt-aa-helper"
new_profile="/etc/apparmor.d/usr.lib.libvirt.virt-aa-helper"
if dpkg --compare-versions "$2" le "0.7.0-1ubuntu15"; then
    sed -i "s#/usr/bin/virt-aa-helper#/usr/lib/libvirt/virt-aa-helper#g" "$old_profile"
--

Changed in libvirt (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in libvirt (Ubuntu Lucid):
assignee: nobody → Jamie Strandboge (jdstrand)
Revision history for this message
Colin Watson (cjwatson) wrote :

Instead of -n "$2", just use the le-nl operator in place of le.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.2-4ubuntu4

---------------
libvirt (0.7.2-4ubuntu4) lucid; urgency=low

  * debian/libvirt-bin.postinst: don't sed a non-existent file (LP: #493582)
 -- Jamie Strandboge <email address hidden> Mon, 07 Dec 2009 08:55:03 -0600

Changed in libvirt (Ubuntu Lucid):
status: Triaged → 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.