[cosmic/bionic/xenial/trusty][PATCH] UBUNTU: [Packaging] Sort the config file for single arch and single flavour kernels

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Thu Sep 13 13:53:25 UTC 2018


BugLink: http://bugs.launchpad.net/bugs/1792387

Single arch and single flavour kernels, such as the cloud kernels, are
currently shipping a config file (that is installed under /boot) that
is not properly ordered as the ones generated the master kernels.

The problem occurs because `make silendoldconfig` in
"debian/rules.d/2-binary-arch.mk" does not re-writes the config file
(and thus does not sort it) when no changes are made.

Change the "2-binary-arch.mk" makefile to force the re-generation of
the config file if its header was generated by splitconfig, since
that's the way the config fragments are kept in
"debian.<branch>/config".

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
---
 debian/rules.d/2-binary-arch.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index aaf3d43379ed..ea68d49dfe1a 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -30,6 +30,8 @@ $(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(arc
 	cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' > $(builddir)/build-$*/.config
 	find $(builddir)/build-$* -name "*.ko" | xargs rm -f
 	$(build_cd) $(kmake) $(build_O) -j1 silentoldconfig prepare scripts
+	head -n 3 $(builddir)/build-$*/.config | grep -qF splitconfig.pl && \
+		yes "" | $(build_cd) $(kmake) $(build_O) -j1 oldconfig || true
 	touch $@
 
 # Used by developers as a shortcut to prepare a tree for compilation.
-- 
2.17.1





More information about the kernel-team mailing list