apt-get source linux-restricted modules

Colin Watson cjwatson at ubuntu.com
Fri Nov 28 10:48:51 UTC 2008


On Fri, Nov 28, 2008 at 11:30:30AM +0100, Stefan Bader wrote:
> This was briefly discussed/encountered this morning and after some thoughts 
> on it I am not completely sure this is really a bug or just the odd way 
> things are supposed to happen.
> The thing probably most starters (me too) stumble over is, if they try to 
> build or modify the lrm package (the same would happen with lum+lbm but 
> since we start from git trees there it does not show up as with lrm) the 
> first thing to try is: apt-get source linux-restircted-modules. However 
> this will result in the linux-meta source to be fetched. The same happens 
> with linux-restricted-modules-generic. This is confusing but probably the 
> very right thing, given that both are names of meta-packages and the source 
> package for those _is_ linux-meta. The real package is 
> linux-restricted-modules-$(uname -r) for the current running kernel and 
> this correctly fetches the right source.
> 
> The question now is: can or should this be changed or is there no way 
> around it but has just to be clearly documented on the wiki. Is the source 
> package of a meta-package the source it was build from or the source it 
> resolves to?

Metapackages aren't magic at this level. There is absolutely nothing
special to metapackages (as such; i.e. packages that have no significant
content themselves, but exist purely for their dependencies) going on
here.

The only thing that's odd here is that there's a 'linux' source package
that produces a bunch of binaries (not including 'linux'), a
'linux-restricted-modules' source package that produces another bunch of
binaries (not including 'linux-restricted-modules'), and a 'linux-meta'
source package that produces a bunch of binaries (including 'linux' and
'linux-restricted-modules'). Thus there is an ambiguity: it is not clear
whether you wanted the source for the binary package 'linux' or the
source package 'linux'.

I did say on IRC that this was a bug, but on a little further
investigation I find that it's configurable. apt-get(8) says:

       --only-source
           Only has meaning for the source and build-dep commands.
           Indicates that the given source names are not to be mapped
           through the binary table. This means that if this option is
           specified, these commands will only accept source package
           names as arguments, rather than accepting binary package
           names and looking up the corresponding source package.
           Configuration Item: APT::Get::Only-Source.

In other words, 'apt-get --only-source source linux-restricted-modules'
means "no, really the source package linux-restricted-modules, not
whatever source package produces the linux-restricted-modules binary". I
think if I had been writing this code I'd have made it the default, but
given that it's a configuration option I'm not sure that it's worth
causing confusion by changing the default. It probably makes sense to
just document --only-source for the kernel team.

Cheers,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]




More information about the kernel-team mailing list