In the same way that virtualbox-ose conflicts with virtualbox (the official package), virtualbox-ose-modules packages should conflict with "virtualbox".
With virtualbox-ose and virtualbox-ose-modules-* installed, the following error happens when installing virtualbox from the official repository:
Removing virtualbox-ose ...
Shutting down VirtualBox host networking ...done.
* Stopping VirtualBox kernel module vboxdrv [ OK ]
Selecting previously deselected package virtualbox.
(Reading database ... 370820 files and directories currently installed.)
Unpacking virtualbox (from .../virtualbox_1.6.6-35336%5fUbuntu%5fhardy_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/virtualbox_1.6.6-35336%5fUbuntu%5fhardy_i386.deb (--unpack):
trying to overwrite `/lib/modules/2.6.24-19-generic/misc/vboxdrv.ko', which is also in package virtualbox-ose-modules-2.6.24-19-generic
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/virtualbox_1.6.6-35336%5fUbuntu%5fhardy_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I think there should be a "Conflicts: virtualbox" with every binary package that ships vboxdrv.ko.
In the same way that virtualbox-ose conflicts with virtualbox (the official package), virtualbox- ose-modules packages should conflict with "virtualbox".
With virtualbox-ose and virtualbox- ose-modules- * installed, the following error happens when installing virtualbox from the official repository:
Removing virtualbox-ose ... 1.6.6-35336% 5fUbuntu% 5fhardy_ i386.deb) ... apt/archives/ virtualbox_ 1.6.6-35336% 5fUbuntu% 5fhardy_ i386.deb (--unpack): 2.6.24- 19-generic/ misc/vboxdrv. ko', which is also in package virtualbox- ose-modules- 2.6.24- 19-generic apt/archives/ virtualbox_ 1.6.6-35336% 5fUbuntu% 5fhardy_ i386.deb
Shutting down VirtualBox host networking ...done.
* Stopping VirtualBox kernel module vboxdrv [ OK ]
Selecting previously deselected package virtualbox.
(Reading database ... 370820 files and directories currently installed.)
Unpacking virtualbox (from .../virtualbox_
dpkg: error processing /var/cache/
trying to overwrite `/lib/modules/
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
I think there should be a "Conflicts: virtualbox" with every binary package that ships vboxdrv.ko.