Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#642988: leave out linux-headers packages by default in experimental (http://www.linux-archive.org/debian-kernel/582286-bug-642988-leave-out-linux-headers-packages-default-experimental.html)

Jonathan Nieder 10-01-2011 08:51 AM

Bug#642988: leave out linux-headers packages by default in experimental
 
Ben Hutchings wrote:
> On Fri, 2011-09-30 at 21:31 -0500, Jonathan Nieder wrote:

>> # Summary: [experimental] linux-headers depends on linux-kbuild-3.1.0
>> # which is not in the archive
>> # Workaround: build src:linux-tools from svn.debian.org. Or don't use
>> # out-of-tree modules.
>
> This keeps happening, because we can't really be bothered to support OOT
> crap in experimental. I'm tempted to resolve this by not building the
> linux-headers packages in experimental.

That sounds like the right thing to do. Could be as simple as this.
With this patch:

- An ordinary build of an experimental kernel with "debian/rules
binary" does not build kernel-headers packages.

- However, the headers are still advertised in debian/control and one
can force headers to be built with a command like

fakeroot debian/rules DEBIAN_KERNEL_HEADERS=YesPlease

or

fakeroot make -f debian/rules.gen
binary-arch_amd64_none_real DEBIAN_KERNEL_HEADERS=Yep

Just a sketch, untested. Sane?
---
debian/bin/gencontrol.py | 1 +
debian/rules.real | 16 +++++++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
mode change 100644 => 100755 debian/bin/gencontrol.py

diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
old mode 100644
new mode 100755
index b25433fd..6ff37182
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -26,6 +26,7 @@ class Gencontrol(Base):
'UPSTREAMVERSION': self.version.linux_upstream,
'ABINAME': self.abiname,
'SOURCEVERSION': self.version.complete,
+ 'HEADERS': (self.changelog[0].distribution != 'experimental')
})

def do_main_packages(self, packages, vars, makeflags, extra):
diff --git a/debian/rules.real b/debian/rules.real
index 649f10ad..c8c39910 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -26,6 +26,9 @@ endif
ifdef DEBIAN_KERNEL_JOBS
JOBS_ARG = -j$(DEBIAN_KERNEL_JOBS)
endif
+ifdef DEBIAN_KERNEL_HEADERS
+ override HEADERS = True
+endif

setup_env := env -u ABINAME -u ARCH -u FEATURESET -u FLAVOUR -u VERSION -u LOCALVERSION
setup_env += DISTRIBUTION_OFFICIAL_BUILD=1 DISTRIBUTION_UPLOADER=$(UPLOADER) DISTRIBUTION_VERSION="$(SOURCEVERSION)"
@@ -38,18 +41,25 @@ MAKE_PERF_VARS = prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=
#
# Targets
#
-binary-arch-arch: install-headers_$(ARCH)
binary-arch-arch: install-libc-dev_$(ARCH)
+ifeq ($(HEADERS),True)
+ binary-arch-arch: install-headers_$(ARCH)
+endif
ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(ARCH)),)
binary-arch-arch: install-tools_$(ARCH)
endif
-binary-arch-featureset: install-headers_$(ARCH)_$(FEATURESET)
+binary-arch-featureset:
+ifeq ($(HEADERS),True)
+ binary-arch-featureset: install-headers_$(ARCH)_$(FEATURESET)
+endif
binary-arch-flavour: install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE)
ifeq ($(DEBUG),True)
binary-arch-flavour: install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
endif
ifeq ($(MODULES),True)
- binary-arch-flavour: install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
+ ifeq ($(HEADERS),True)
+ binary-arch-flavour: install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
+ endif
endif

binary-indep: install-doc
--
1.7.7.rc1




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111001085103.GA12087@elie">http://lists.debian.org/20111001085103.GA12087@elie


All times are GMT. The time now is 07:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.