<div class="gmail_quote"><div><div><div>Why does autoremoving the ubuntu-virt-mgmt metapackage fail to remove any dependencies, while autoremoving the virt-manager package works as expected?</div><div><br></div><div>Is there a difference in the way that metapackages are processed vs normal packages?</div>


<div>I looked at the debian/control on the source for both of them but didn't see anything out of the ordinary.</div><div><br></div><div>If they are treated differently, I'd like to know how to create a hybrid-metapackage.</div>

<div>When a hybrid-metapackage is autoremoved, it's dependencies should be removed with it.</div><div><br></div><div>From <a href="https://gist.github.com/3004812" target="_blank">https://gist.github.com/3004812</a> :</div>


<div><br></div><div>## We have a the ubuntu-virt-mgmt metapackage:</div><div><br></div><div>```</div><div> # apt-cache showpkg ubuntu-virt-mgmt | grep -A1 Dependencies</div><div>Dependencies: </div><div>1.3 - virt-manager (0 (null)) python-vm-builder (0 (null)) virt-viewer (0 (null)) </div>


<div>```</div><div><br></div><div>## Which depends on the virt-manager package:</div><div><br></div><div>```</div><div> # apt-cache showpkg virt-manager | grep -A1 Dependencies</div><div>Dependencies: </div><div>0.9.1-1ubuntu5.1 - gconf2 (2 2.28.1-2) python (2 2.7.1-0ubuntu2) python-gtk2 (0 (null)) python-glade2 (0 (null)) python-gnome2 (0 (null)) python-dbus (0 (null)) python-urlgrabber (0 (null)) python-vte (0 (null)) librsvg2-common (0 (null)) python-libvirt (2 0.7.1) virtinst (2 0.600.1) python-gtk-vnc (2 0.3.8) python-appindicator (0 (null)) libvirt-bin (2 0.4.6) virt-viewer (0 (null)) ssh-askpass (0 (null)) gnome-keyring (0 (null)) python-gnomekeyring (0 (null)) hal (0 (null)) python-guestfs (0 (null)) python-spice-client-gtk (0 (null)) gnome-icon-theme (0 (null)) </div>


<div>```</div><div><br></div><div>## If we install ubuntu-virt-mgmt metapackage, it installs all it's dependencies, including virt-manager</div><div><br></div><div>```</div><div> # apt-get install -y ubuntu-virt-mgmt</div>


<div>Reading package lists... Done</div><div>Building dependency tree       </div><div>Reading state information... Done</div><div>The following extra packages will be installed:</div><div>  libgtk-vnc-1.0-0 libgtk-vnc-2.0-0 libgvnc-1.0-0 python-gtk-vnc</div>


<div>  python-vm-builder virt-manager virt-viewer</div><div>Suggested packages:</div><div>  libvirt-bin hal python-guestfs python-spice-client-gtk</div><div>The following NEW packages will be installed:</div><div>  libgtk-vnc-1.0-0 libgtk-vnc-2.0-0 libgvnc-1.0-0 python-gtk-vnc</div>


<div>  python-vm-builder ubuntu-virt-mgmt virt-manager virt-viewer</div><div>0 upgraded, 8 newly installed, 0 to remove and 20 not upgraded.</div><div>Need to get 0 B/976 kB of archives.</div><div>After this operation, 8,321 kB of additional disk space will be used.</div>


<div>Selecting previously unselected package libgvnc-1.0-0.</div><div>(Reading database ... 271875 files and directories currently installed.)</div><div>Unpacking libgvnc-1.0-0 (from .../libgvnc-1.0-0_0.5.0-1ubuntu1_amd64.deb) ...</div>


<div>Selecting previously unselected package libgtk-vnc-1.0-0.</div><div>Unpacking libgtk-vnc-1.0-0 (from .../libgtk-vnc-1.0-0_0.5.0-1ubuntu1_amd64.deb) ...</div><div>Selecting previously unselected package libgtk-vnc-2.0-0.</div>


<div>Unpacking libgtk-vnc-2.0-0 (from .../libgtk-vnc-2.0-0_0.5.0-1ubuntu1_amd64.deb) ...</div><div>Selecting previously unselected package python-gtk-vnc.</div><div>Unpacking python-gtk-vnc (from .../python-gtk-vnc_0.5.0-1ubuntu1_amd64.deb) ...</div>


<div>Selecting previously unselected package virt-manager.</div><div>Unpacking virt-manager (from .../virt-manager_0.9.1-1ubuntu5.1_all.deb) ...</div><div>Selecting previously unselected package python-vm-builder.</div><div>


Unpacking python-vm-builder (from .../python-vm-builder_0.12.4+bzr477-0ubuntu1_all.deb) ...</div><div>Selecting previously unselected package virt-viewer.</div><div>Unpacking virt-viewer (from .../virt-viewer_0.4.2-1_amd64.deb) ...</div>


<div>Selecting previously unselected package ubuntu-virt-mgmt.</div><div>Unpacking ubuntu-virt-mgmt (from .../ubuntu-virt-mgmt_1.3_all.deb) ...</div><div>Processing triggers for gconf2 ...</div><div>Processing triggers for man-db ...</div>


<div>Processing triggers for hicolor-icon-theme ...</div><div>Processing triggers for bamfdaemon ...</div><div>Rebuilding /usr/share/applications/bamf.index...</div><div>Processing triggers for desktop-file-utils ...</div>


<div>Processing triggers for gnome-menus ...</div><div>Setting up libgvnc-1.0-0 (0.5.0-1ubuntu1) ...</div><div>Setting up libgtk-vnc-1.0-0 (0.5.0-1ubuntu1) ...</div><div>Setting up libgtk-vnc-2.0-0 (0.5.0-1ubuntu1) ...</div>


<div>Setting up python-gtk-vnc (0.5.0-1ubuntu1) ...</div><div>Setting up virt-manager (0.9.1-1ubuntu5.1) ...</div><div>Setting up python-vm-builder (0.12.4+bzr477-0ubuntu1) ...</div><div>Setting up virt-viewer (0.4.2-1) ...</div>


<div>Processing triggers for python-central ...</div><div>Setting up ubuntu-virt-mgmt (1.3) ...</div><div>Processing triggers for libc-bin ...</div><div>ldconfig deferred processing now taking place</div><div>```</div><div>


<br></div><div>## And then autoremove ubuntu-virt-mgmr... it leaves behind all it's dependencies:</div><div><br></div><div>```</div><div> #  apt-get autoremove -y ubuntu-virt-mgmt</div><div>Reading package lists... Done</div>


<div>Building dependency tree       </div><div>Reading state information... Done</div><div>The following packages will be REMOVED:</div><div>  ubuntu-virt-mgmt</div><div>0 upgraded, 0 newly installed, 1 to remove and 20 not upgraded.</div>


<div>After this operation, 32.8 kB disk space will be freed.</div><div>(Reading database ... 272353 files and directories currently installed.)</div><div>Removing ubuntu-virt-mgmt ...</div><div>```</div><div><br></div><div>


## However if we autoremove virt-manager it removes it's dependencies:</div><div><br></div><div>```</div><div> #  apt-get autoremove -y virt-manager</div><div>Reading package lists... Done</div><div>Building dependency tree       </div>


<div>Reading state information... Done</div><div>The following packages will be REMOVED:</div><div>  libgtk-vnc-1.0-0 python-gtk-vnc virt-manager</div><div>0 upgraded, 0 newly installed, 3 to remove and 20 not upgraded.</div>


<div>After this operation, 3,248 kB disk space will be freed.</div><div>(Reading database ... 272350 files and directories currently installed.)</div><div>Removing virt-manager ...</div><div>Removing python-gtk-vnc ...</div>


<div>Removing libgtk-vnc-1.0-0 ...</div><div>Processing triggers for bamfdaemon ...</div><div>Rebuilding /usr/share/applications/bamf.index...</div><div>Processing triggers for desktop-file-utils ...</div><div>Processing triggers for gnome-menus ...</div>


<div>Processing triggers for hicolor-icon-theme ...</div><div>Processing triggers for man-db ...</div><div>Processing triggers for gconf2 ...</div><div>Processing triggers for libc-bin ...</div><div>ldconfig deferred processing now taking place</div>


<div>```</div><div><br></div><div># What is the difference between the way metapackage and real package dependencies are processed?</div><div><br></div><div># Why does autoremoving the ubuntu-virt-mgmt metapackage fail to remove any dependencies, while autoremoving the virt-manager package works as expected?</div>


</div></div><div><br></div>
</div><br>