Installing virtualbox-ose-modules pulls in 386 kernel (on -generic)

Bug #188579 reported by sibidiba
78
Affects Status Importance Assigned to Milestone
apt (Debian)
New
Unknown
apt (Ubuntu)
Triaged
Medium
Unassigned
virtualbox-ose-modules (Ubuntu)
Fix Released
High
Daniel Hahler

Bug Description

Binary package hint: virtualbox-ose

On Ubuntu Hardy alpha 4:

When installing virtualbox-ose with aptitude, it installs the -386 kernel image unnecessarily and virtualbox-ose-modules-2.6.24-5-386 instead of the -generic one.

virtualbox-ose-modules has been a virtual package, provided by all the different flavours of the module (-386, -generic, ..). But apt fails to find the "best path" when selecting a package: it seems to always chose the -386 one, although using the -generic one would have to pull less dependencies in (in particular the linux-image-386).
Also when using real meta packages (instead of virtual packages), the problem persist.

Is this a packaging problem with virtualbox-ose-modules or is apt missing the expected feature? Is there a way to provide better hinting?

WORKAROUND: Install the virtualbox-ose-modules-$flavor package manually, e.g.:
$ sudo apt-get install virtualbox-ose-modules-generic virtualbox-ose

(AppArmor seems to be affected by a similar/the same issue, see bug 148586)

Revision history for this message
Daniel Hahler (blueyed) wrote :

That's probably because of the resolution of the virtual package "virtualbox-ose-modules" done by aptitude.

If I remember correctly, there has been a similar bug already been reported before. I'm adding a bug task for aptitude.
Have you tested it using apt alone?

FYI:
$ aptitude search '~Pvirtualbox-ose-modules'
p virtualbox-ose-modules-2.6.24-5-386 - virtualbox-ose modules for linux-image-2.6.24-5-386
i virtualbox-ose-modules-2.6.24-5-generic - virtualbox-ose modules for linux-image-2.6.24-5-generic
p virtualbox-ose-modules-2.6.24-5-rt - virtualbox-ose modules for linux-image-2.6.24-5-rt
p virtualbox-ose-modules-2.6.24-5-server - virtualbox-ose modules for linux-image-2.6.24-5-server
p virtualbox-ose-modules-2.6.24-5-virtual - virtualbox-ose modules for linux-image-2.6.24-5-virtual

Changed in virtualbox-ose:
importance: Undecided → High
Revision history for this message
sibidiba (sibidiba) wrote :

After uninstalling VirtualBox and it's modules package, and trying to install it again with apt:

$ sudo apt-get install virtualbox

The following extra packages will be installed:
  linux-image-2.6.24-5-386 virtualbox-ose virtualbox-ose-modules-2.6.24-5-386

And again the (uncorrect) -386 module (and the corresponding kernel image also) is automatically installed.

Isn't maybe the virtualbox-ose-modules virtual package broken. apt-cache show returns an empty output.
And this is the package virtualbox is depending on, and this should depend on the correct module package.

Revision history for this message
Caspar Adriani (thecas) wrote :

 linux-image-2.6.24-5-386 and modules are also installed here, the -386 seems to have no SMP support either.

Revision history for this message
Juraj Lukac (hrasko) wrote :

HI,
I'm running Ubuntu 8.04 and until today's updates I could run virtualbox with kernel-image-2.6.24-386 installed and booted up. Today after updates I got the new kernel 2.6.24-10 and after reboot virtualbox didn't run again. I couldn't find any virtualbox-ose-modules for the 2.6.24-10 kernel so I tried to install virtualbox-ose-modules for kernel 2.6.24-8 and booted up kernel 2.6.24.8 but virtualbox couln't run again.

Revision history for this message
Juraj Lukac (hrasko) wrote :

When I switched to linux-kernel-2.6.24-386-generic and installed virtualbox-ose-modules for this kernel, Virtualbox works again now.

Revision history for this message
sibidiba (sibidiba) wrote :

I guess the modules packages for 2.6.24-10 will be released soon.

But still, the original bug remains:

When installing virtualbox-ose (with apt-get or aptitude), to resolve the dependency on the virtual package virtualbox-ose-modules, virtualbox-ose-modules-(version)-386 is installed _and_ the whole -386 kernel.

The following packages provide virtualbox-ose-modules:
virtualbox-ose-modules-2.6.24-8-386
virtualbox-ose-modules-2.6.24-8-rt
virtualbox-ose-modules-2.6.24-8-virtual
virtualbox-ose-modules-2.6.24-8-generic
virtualbox-ose-modules-2.6.24-8-server

Why does apt(itude) chose -386, implying the installation of the whole -386 kernel when it could simply pick the module for the current (-generic) one?

And it becomes even stranger: if instead of installing virtualbox-ose, you type aptitude install virtualbox, aptitude suggests to install the -gereic module!
(apt-get install virtualbox results as previously in installation of the -386 module and kernel)

But there is no such package with the name virtualbox. It is a virtual package, provided by virtualbox-ose.
Why doeas aptitude suggest a different 'modules' package?

Are there any package priorities, and when yes, how can someone tweak them?

Daniel Hahler (blueyed)
Changed in virtualbox-ose:
status: New → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :

The problem occurs with the resolution of virtualbox-ose-modules. When you try manually installing it, apt says, that's a virtual package, provided by:
  virtualbox-ose-modules-2.6.24-10-virtual 12
  virtualbox-ose-modules-2.6.24-10-server 12
  virtualbox-ose-modules-2.6.24-10-rt 12
  virtualbox-ose-modules-2.6.24-10-generic 12
  virtualbox-ose-modules-2.6.24-10-386 12

Manually installing virtualbox-ose-modules-2.6.24-10-generic then fixes this.

I'll try to workaround this by providing real meta packages, instead of virtual packages.

Changed in virtualbox-ose-modules:
assignee: nobody → blueyed
status: Triaged → In Progress
Daniel Hahler (blueyed)
Changed in aptitude:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Daniel Hahler (blueyed) wrote : virtualbox-ose-modules (version 13) dependency graph

Attaching a graph to illustrate the dependencies. This is with version 13 of the package, which does not use virtual packages anymore, but meta packages instead (to provide better upgrade experiences and allow side-by-side installation)

description: updated
Changed in virtualbox-ose-modules:
assignee: blueyed → nobody
status: In Progress → Triaged
Daniel Hahler (blueyed)
description: updated
Revision history for this message
Daniel Hahler (blueyed) wrote :

Another hint:
"apt-get install virtualbox-ose virtualbox-ose-modules-generic" still pulls the 386 kernel in, while first selecting the correct modules package works: "apt-get install virtualbox-ose-modules-generic virtualbox-ose"

Revision history for this message
Daniel Hahler (blueyed) wrote :

JFI: This also happens with apt 0.7.11 from Debian unstable, without any Ubuntu patches.

Revision history for this message
lupus (kristof-vansant) wrote :

after installing the module-generic manually I had to manually depmod.
modprobe couldn't find the module until that command was given.

Revision history for this message
Daniel Hahler (blueyed) wrote :

lupus, please keep your issue separate, because it makes fixing bugs more complicated, if things get mixed up!
It should be fixed already for Hardy (see bug 152376). If you've experienced it in Ubuntu Hardy, please reopen that bug or report a new one.

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

This bug was fixed in the package virtualbox-ose-modules - 16

---------------
virtualbox-ose-modules (16) hardy; urgency=low

  * Dropped meta package "virtualbox-ose-modules" and use "Provides" in
    the real packages. The meta packages for the different flavours should be
    enough to get updates automatically.
    This fixes the problem where apt pulls in the wrong kernel, when
    installing virtualbox-ose (LP: #188579)

 -- Daniel Hahler <email address hidden> Fri, 14 Mar 2008 02:27:27 +0100

Changed in virtualbox-ose-modules:
status: Triaged → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

Well, currently it still is not fixed, for virtualbox-ose and virtualbox-ose-guest-utils. I've thought only using "Provides" on a package which depends on the kernel, would fix it.

$ LANG=C sudo apt-get install -V -o Debug::pkgDepCache::AutoInstall=true virtualbox-ose
Reading package lists... Done
Building dependency tree
Reading state information... Done
Installing virtualbox-ose-modules as dep of virtualbox-ose
Installing virtualbox-ose-modules-386 as dep of virtualbox-ose-modules
Installing virtualbox-ose-modules-2.6.24-12-386 as dep of virtualbox-ose-modules-386
Installing linux-image-2.6.24-12-386 as dep of virtualbox-ose-modules-2.6.24-12-386
The following packages were automatically installed and are no longer required:
   virtualbox-ose-modules-386 (18~blueyedppa1)
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
   linux-image-2.6.24-12-386 (2.6.24-12.22)
   virtualbox-ose-modules-2.6.24-12-386 (18~blueyedppa1)
   virtualbox-ose-modules-386 (18~blueyedppa1)
Suggested packages:
   linux-doc-2.6.24 (2.6.24-12.22)
   linux-source-2.6.24 (2.6.24-12.22)
   virtualbox-ose-source (1.5.6-dfsg-2ubuntu1)
The following NEW packages will be installed:
   linux-image-2.6.24-12-386 (2.6.24-12.22)
   virtualbox-ose (1.5.6-dfsg-2ubuntu1)
   virtualbox-ose-modules-2.6.24-12-386 (18~blueyedppa1)
   virtualbox-ose-modules-386 (18~blueyedppa1)
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.6MB/25.0MB of archives.
After this operation, 81.5MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

$ LANG=C sudo apt-get install -V -o Debug::pkgDepCache::AutoInstall=true virtualbox-ose-guest-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Installing virtualbox-ose-guest-modules-2.6.24-12-386 as dep of virtualbox-ose-guest-utils
Installing linux-image-2.6.24-12-386 as dep of virtualbox-ose-guest-modules-2.6.24-12-386
The following extra packages will be installed:
   linux-image-2.6.24-12-386 (2.6.24-12.22)
   virtualbox-ose-guest-modules-2.6.24-12-386 (18~blueyedppa1)
Suggested packages:
   linux-doc-2.6.24 (2.6.24-12.22)
   linux-source-2.6.24 (2.6.24-12.22)
   virtualbox-ose-guest-source (1.5.6-dfsg-2ubuntu1)
The following NEW packages will be installed:
   linux-image-2.6.24-12-386 (2.6.24-12.22)
   virtualbox-ose-guest-modules-2.6.24-12-386 (18~blueyedppa1)
   virtualbox-ose-guest-utils (1.5.6-dfsg-2ubuntu1)
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.5MB/18.9MB of archives.
After this operation, 61.6MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

Changed in virtualbox-ose-modules:
status: Fix Released → Triaged
Daniel Hahler (blueyed)
Changed in apt:
status: Confirmed → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :

I've investigated, by looking at apt's internals and it seems like apt just always installs the first available package to satisfy the depends (ordered by priority, but that's not important here).
I've filed a bug in Debian about it, but I suspect that we have to revert back to using "Recommends" instead of "Depends".
I'm still interested in any feedback/ideas, of course.

Changed in virtualbox-ose-modules:
assignee: nobody → blueyed
status: Triaged → In Progress
Changed in apt:
status: Unknown → New
Revision history for this message
Daniel Hahler (blueyed) wrote :

Fixed in virtualbox-ose (1.5.6-dfsg-2ubuntu2):
virtualbox-ose (1.5.6-dfsg-2ubuntu2) hardy; urgency=low

  * debian/control: change Depends of modules to Recommends (LP: #188579)
    - virtualbox-ose-guest-utils only recommends virtualbox-ose-guest-modules
    - virtualbox-ose only recommends virtualbox-ose-modules
  * debian/virtualbox-ose-guest-utils.init:
    Exit with status 0 in case "vboxadd" cannot get loaded in "start"
  * debian/virtualbox-ose.vboxdrv.init:
    Fix test for existing kernel module. Forwarded upstream as #1357.

 -- Daniel Hahler <email address hidden> Thu, 20 Mar 2008 20:36:30 +0100

Changed in virtualbox-ose-modules:
status: In Progress → 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.