Ensure that matching linux-headers-* is installed

Bug #567699 reported by Jerone Young
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
jockey (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Today when someone installs from an ubuntu DVD. It so happens that when the PAE kernel is installed it keeps kernel-headers package, but it erases the kernel-headers-generic package & replaces it with the kernel-headers-generic-pae.

This is mainly a fix to the debian/control file. But basically need to add kernel-headers-generic-pae into the control file. But since kernel-headers is kept around .. it just happens to work. This is to ensure it is spelled out to be in the file.

Revision history for this message
Jerone Young (jerone) wrote :
Revision history for this message
Emmet Hikory (persia) wrote :

There are N flavours of kernel headers available, and adding one more won't help. The "linux-headers" virtual package is satisfied by the headers for each linux flavour. Unfortunately, there is no guarantee that the linux headers for the running kernel (or the expected-to-be-running-kernel) are available at install time.

If this is a bug, the bug is in *all* DKMS-using packages in that they ought detect whether the running kernel matches the available kernel headers, and if not, warn the user and offer to install matching kernel headers.

Revision history for this message
Martin Pitt (pitti) wrote :

I don't see how this would help at all? All kernel-headers-* flavours have a Provides: linux-headers.

Unfortunately this is a highly nontrivial problem. There is no way to express "we need the same kernel header flavour as the installed kernel" in terms of package dependencies. The only thing that we could do is to check the match in dkms and/or jockey and offer to install the corresponding kernel headers.

Revision history for this message
Bryce Harrington (bryce) wrote :

Bumping to jockey as per martin's comment. He can evaluate whether it's worth doing in jockey or dkms and reassign from there.

affects: nvidia-graphics-drivers (Ubuntu) → jockey (Ubuntu)
Changed in jockey (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
summary: - Ensure nvidia package works in future for PAE kernel installs
+ Ensure that matching linux-headers-* is installed
Changed in jockey (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Anders Kaseorg (andersk) wrote :

To explain the problem from bug 550905 (which was marked as a duplicate of this) more clearly:

If the user has the linux-image-generic metapackage installed, apt upgrades will automatically get them the _most recent_ linux-image-2.6.35-NN-generic kernel package available. However, Jockey only installs the linux-headers-2.6.35-NN-generic package corresponding to the _current_ kernel package, as of when the driver was installed.

The fix is for Jockey to install the linux-headers-generic metapackage if the linux-image-generic metapackage is installed (and so on for other kernel flavors). This will ensure that apt will pull in the most recent linux-headers-2.6.35-NN-generic along with the most recent linux-image-2.6.35-NN-generic.

Revision history for this message
Martin Pitt (pitti) wrote :

The nvidia and fglrx handlers already do that. So the main missing use case here is the broadcom wl driver. I'll generalize the code.

Changed in jockey (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I committed support for a new Handler.needs_kernel_headers flag to jockey trunk r717, together with appropriate test cases.

Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr now.

Changed in jockey (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Anders Kaseorg (andersk) wrote :

Martin: I think you misunderstand the problem.

Even with the current version in bzr (lp:~ubuntu-core-dev/jockey/ubuntu r531), I get the following:

$ aptitude search '^linux.*generic$~i'
i linux-generic - Complete Generic Linux kernel
i linux-image-2.6.38-7-generic - Linux kernel image for version 2.6.38 on x
i linux-image-generic - Generic Linux kernel image
$ jockey-gtk
[install the nvidia driver]
$ aptitude search '^linux.*generic$~i'
i linux-generic - Complete Generic Linux kernel
i linux-headers-2.6.38-7-generic - Linux kernel headers for version 2.6.38 on
i linux-image-2.6.38-7-generic - Linux kernel image for version 2.6.38 on x
i linux-image-generic - Generic Linux kernel image

To solve this bug, the ‘linux-headers-generic’ metapackage needs to be installed, not just the ‘linux-headers-2.6.38-7-generic’ package. For why this is important, reread my comment above.

Changed in jockey (Ubuntu):
status: Fix Committed → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, of course, sorry.

Changed in jockey (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in r532.

Changed in jockey (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package jockey - 0.9.2-0ubuntu4

---------------
jockey (0.9.2-0ubuntu4) natty; urgency=low

  [ Martin Pitt ]
  * data/handlers/nvidia.py: Some cleanup:
    - Drop obsolete add_modules=['glx'].
    - Drop setting DefaultDepth=24, X.org does that by default now.
    - Move version 96 specific code to NvidiaDriver96 class.
    - Remove some dead code.
  * Merge from trunk:
    - XorgDriverHandler: Support None X.org driver to avoid changing the
      Driver setting. This is appropriate for drivers which X.org conf
      autodetects.
    - Add new flag Handler.needs_kernel_headers and install kernel headers if
      set.
  * data/handlers/{nvidia,fglrx}.py: Stop setting the X.org driver and
    alternate free driver. Natty's X.org now prefers the proprietary drivers
    over the free ones when available (105_nvidia_fglrx_autodetect.patch).
    This allows X.org to fall back to the free driver if the proprietary one
    gets broken or out of sync. (LP: #522061)
  * jockey/oslib.py: Set kernel header metapackage name from currently running
    kernel flavour, and add a small test case that it is a valid package.
  * data/handlers/{nvidia,fglrx}.py: Replace custom code to install kernel
    headers with setting the needs_kernel_headers flag.
  * data/handlers/broadcom_wl.py: Set needs_kernel_headers flag. (LP: #567699)
  * jockey/oslib.py, install_packages(): python-apt recently changed
    "architecture" field of a candidate Version; where it used to say "all"
    it now has the platform name. So switch to
    candidate.record['Architecture'] to check if a package is Arch: all. This
    unbreaks installation of unsigned third-party PPD packages.

  [ Alberto Milone ]
  * data/handlers/fglrx.py:
    - Re-enable fglrx.
    - Replace tabs with whitespaces.
  * data/handlers/nvidia.py:
    - Replace tabs with whitespaces.
 -- Martin Pitt <email address hidden> Thu, 31 Mar 2011 17:29:28 +0200

Changed in jockey (Ubuntu):
status: Fix Committed → Fix Released
joopbraak (joopbraak)
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.