[ATrpms-users] Re: Virtual packages and multiple kernels?

Alan Hagge ahagge at wbfa.com
Thu Jul 14 18:02:04 CEST 2005


Axel Thimm wrote:

>On Tue, Jul 12, 2005 at 01:45:27PM -0700, Alan Hagge wrote:
>  
>
>>Specifically, I'm looking at the nvidia-graphics package.  I have 2 
>>kernels on my machine (the UP and the SMP kernels, same revision), and 
>>I'd like to be able to just say:
>>
>>   apt-get install nvidia-graphics7667
>>    
>>
>
>The proper way is to tell apt/yum/smart which kernel to install for
>with
>
>apt-get install foo-kmdl-$KERNEL foo
>
>  
>
>>and have both the UP and SMP kernel modules installed along with the 
>>rest of the dependent RPMs (and of course only have it install the UP 
>>module if I have a machine with only the UP kernel installed, etc.).  Is 
>>there a way to do this?
>>
>>Also, ideally, I'd like to just say:
>>
>>   apt-get install nvidia-graphics
>>    
>>
>
>That should already work. It currently points to 7174.
>  
>
OK, I understand what you did.  I modifed the spec for the 7667 release 
and re-generated the binary RPM, and it works OK, other than only 
pulling in the current kernel's kmdl RPM.  Question:  Isn't there a way 
to do this without having to have a "meta-package", by using virtual 
packages in the nvidia-graphicsXXXX spec files?

>>and have the most recent driver installed, but that doesn't seem to work 
>>with the latest RPMS.  Is there any alternative syntax?
>>    
>>
>
>for KERNEL in <list of kernels>; do
>  apt-get install foo-kmdl-$KERNEL
>done
>
><list of kernels> could be simply `uname -r` or even
>`rpm -q --qf '%{version}-%{release}\n' kernel`
>  
>
Good idea, though running that only gives info for kernel, not 
kernel-smp.  Adding kernel-smp to the command line gives a duplicate 
line - in other words, there's no RPM querytag that I can find that 
would output %{version}smp for the SMP kernel.  Did I miss one, or to I 
need to kluge my own workaround?

Also, as I understand your explanations above, if I want to install the 
latest nVidia drivers on my machine with multiple kernels with apt, I'd 
need to:

    * Modify the nvidia-graphics.spec file and re-generate the binary
      RPM for the version I want
    * Use a command like the above (with some mods) to generate a list
      of the currently-installed kernels
    * Do the actual installs with commands like:
           apt-get install nvidia-graphics
           for KERNEL in <list of kernels>; do
                apt-get install nvidia-graphics<version>-kmdl-$KERNEL
           done

      where <version> is the specific version of the kmdl I want to install.

As you can see, this still doesn't get me around having to explicitly 
specify which nVidia driver I want to install (the <version> above).  
The kmdl modules don't provide "nvidia-graphics-kmdl", only the following:

    [root at plucky SPECS]# rpm -q --provides
    nvidia-graphics7667-kmdl-2.6.11-1.27_FC3-1.0_7667-68.rhfc3.at
    nvidia-graphics7667-kmdl-1:1.0_7667-68.rhfc3.at
    nvidia-graphics7667-kmdl-2.6.11-1.27_FC3 = 1:1.0_7667-68.rhfc3.at

And (I _think_, haven't tried it) "apt-get upgrade" wouldn't work when a 
new nVidia release came out, again, because each release of the driver 
has the version in the name, so they're all considered distinct 
packages, correct?

Again, I wonder if virtual packages could help here.  I don't claim to 
know much about RPM creation, so I may be way off base.  Just curious...



More information about the atrpms-users mailing list