[Apt-Rpm] Problem with kmp-packages on the openSUSE buildservice

Panu Matilainen pmatilai at laiskiainen.org
Mon Jan 7 23:32:03 PST 2008


On Mon, 7 Jan 2008, Johannes Kastl wrote:

> Hello,
>
> I use both openSUSE 10.2 and 10.3 on my machine. For a long long time I
> have been using apt, even if it is slow as hell with large repomd-repos.

Repomd format is a real resource pig, yes :-/ The recent extension of 
using sqlite db for the data instead of xml helps somewhat, but of course 
only if the repositories you use supports it.

> But luckily aptate and local mirroring solves this. But now I
> encountered a problem, which seems to be a bug in apt.
>
> I tried to install truecrypt out of the security:/privacy repository on
> the opensuse buildservice
> (<http://download.opensuse.org/repositories/security:/privacy/>).
>
> But as truecrypt requires a kernel module, it needs a kmp-package. When
> using zypper, the kmp-default package gets installed, which fits with
> kernel-default being installed.
>
> But when using apt, it wants to install a lot of stuff:
>> The following extra packages will be installed:
>>   kernel-bigsmp truecrypt-kmp-bigsmp
>> The following NEW packages will be installed:
>>   kernel-bigsmp truecrypt truecrypt-kmp-bigsmp truecrypt-kmp-default
>
> Keep in mind that when using zypper it just installs truecrypt and
> truecrypt-kmp-default, so I would guess the dependencies are correct.
>
> Could someone have a look into this? Or could someone with openSUSE 10.x
> just add the repo and try to install truecrypt?

Kernel packages are special, and kernel module packages are even worse - 
there's no way to generically handle them from a package manager with the 
rpm dependencies currently available. Handling them always requires some 
extra logic (whether built into depsolver or via plugin-type mechanism) to 
have a prayer of a chance of getting it right. Zypper has at least some 
knowledge about them (based on a quick look at the source), while apt 
certainly has not.

What happens here is as follows (a very typical situation with kernel 
module packages, no matter how they're packaged except for dkms):
- you ask apt to install truecrypt
- truecrypt depends on "truecrypt-kmp" virtual provide
- there are several packages providing "truecrypt-kmp", ie
   truecrypt-kmp-default, truecrypt-kmp-bigsmp and whatnot
- apt sees no difference in the packages providing "truecrypt-kmp" so
   it picks up whatever it happens to encounter firsts
- in this case, it happened to be truecrypt-kmp-bigsmp, that in turn
   requires kernel-bigsmp so apt thinks it needs to pull it in

Which is of course not what you wanted, but this would happen in any 
generic depsolver which has no special knowledge of SuSE kernel packaging 
and scheme.

To fully automate it, one would have to write a Lua-extension that knows 
about SuSE kernel and kmp packaging. 
http://apt-rpm.org/lua/upgrade-virtual/ is such an extension for older 
Fedora versions (it's just overly complex for variety of historical 
reasons) but wont work as such for the SuSE kmp case.

Other options require more or less manual work: stuffing all non-relevant 
kmp packages to RPM::Ignore is one possibility, but since RPM::Ignore 
requires full package names instead of accepting regex's, it's somewhat 
cumbersome. Simplest workaround just to provide the kernel module name 
manually in install (eg "apt-get install truecrypt truecrypt-kmp-default") 
but that's not exactly optimal either :-/

 	- Panu -



More information about the Apt-Rpm mailing list