Bug#617943: debian-installer: isolated "make build_netboot" fails due to missing 2.6.32 modules
retitle 617943 debian-installer: should dynamically populate KERNELIMAGEVERSION
On Mon, Mar 14, 2011 at 11:39 AM, Otavio Salvador wrote:
> By default the building system gets the udebs from unstable. This is
> configurated on debian/rules using the building system variable (that
> you ought to take a look at). Another alternative is to use a local
> sources.list.udeb.local file to set it to use the stable suite.
Hi, various regressions have happened lately. "make build_all" doesn't
get around this issue any more. Also, changing udeb sources doesn't
work anymore, "USE_UDEBS_FROM=unstable make build_netboot".
I've ended up having to implement a couple different ugly workarounds
to keep my testing snapshot builds going while various things change.
I've had enough frustration dealing with those that I've decided to
come up with a "real" solution.
The core issue is that KERNELIMAGEVERSION is a hardcoded value in the
arch config files, so its currently stuck at squeeze's version. Thus,
the solution is simply to parse that value from known package info
Attached is a patch that does that for review/feedback.
--- Makefile.orig 2011-07-24 19:34:16.000000000 -0400
+++ Makefile 2011-07-24 19:33:02.000000000 -0400
@@ -588,7 +588,8 @@
# Get the list of udebs to install.
# HACK Alert: pkg-lists/ is still sorted by TYPE instead of a dir hierarchy.
-UDEBS = $(shell set -e; get-packages udeb update >&2; pkg-list $(TYPE) "$(DRIVER_FOR)" $(KERNEL_FLAVOUR) $(KERNELMAJOR) "$(SUBARCH)" $(KERNELIMAGEVERSION)) $(EXTRAS)
+KERNELIMAGEVERSION = $(shell set -e; get-packages udeb update >&2; grep Kernel-Version apt.udeb/state/lists/*_debian_dists_$(USE_UDEBS_FROM)_main_debian-installer_binary-$(ARCH)_Packages | head -1 | cut -d' ' -f2)
+UDEBS = $(shell set -e; pkg-list $(TYPE) "$(DRIVER_FOR)" $(KERNEL_FLAVOUR) $(KERNELMAJOR) "$(SUBARCH)" $(KERNELIMAGEVERSION)) $(EXTRAS)
# Get all required udebs and put them in UDEBDIR.