[PATCH 1/2] UBUNTU: split out the ports configs into their own family

Andy Whitcroft apw at canonical.com
Mon Jun 22 11:30:48 UTC 2009


Introduce the concept of an architectures family, currently either
ubuntu or ports.  This determine which other architectures the configs
will be merged with creating two independant hierachies.

Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 debian/rules.d/0-common-vars.mk  |    2 ++
 debian/rules.d/2-binary-arch.mk  |    2 +-
 debian/rules.d/ia64.mk           |    2 ++
 debian/rules.d/powerpc.mk        |    2 ++
 debian/rules.d/sparc.mk          |    2 ++
 debian/scripts/misc/kernelconfig |   13 +++++++------
 6 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index f392d96..aa4c86a 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -7,6 +7,8 @@ revision ?= $(word $(words $(revisions)),$(revisions))
 prev_revisions := $(filter-out $(revision),0.0 $(revisions))
 prev_revision := $(word $(words $(prev_revisions)),$(prev_revisions))
 
+family=ubuntu
+
 # This is an internally used mechanism for the daily kernel builds. It
 # creates packages who's ABI is suffixed with a minimal representation of
 # the current git HEAD sha. If .git/HEAD is not present, then it uses the
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index ebf3cb3..5fb4b8f 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -6,7 +6,7 @@
 prepare-%: $(stampdir)/stamp-prepare-%
 	@# Empty for make to be happy
 $(stampdir)/stamp-prepare-%: target_flavour = $*
-$(stampdir)/stamp-prepare-%: $(commonconfdir)/config.common.ubuntu $(archconfdir)/config.common.$(arch) $(archconfdir)/config.flavour.%
+$(stampdir)/stamp-prepare-%: $(commonconfdir)/config.common.$(family) $(archconfdir)/config.common.$(arch) $(archconfdir)/config.flavour.%
 	@echo "Preparing $*..."
 	install -d $(builddir)/build-$*
 	touch $(builddir)/build-$*/ubuntu-build
diff --git a/debian/rules.d/ia64.mk b/debian/rules.d/ia64.mk
index 0cbb358..9ef25b8 100644
--- a/debian/rules.d/ia64.mk
+++ b/debian/rules.d/ia64.mk
@@ -14,3 +14,5 @@ skipdbg		= true
 no_dumpfile	= true
 skipabi		= true
 skipmodule	= true
+
+family=ports
diff --git a/debian/rules.d/powerpc.mk b/debian/rules.d/powerpc.mk
index 2218111..d7a3e7b 100644
--- a/debian/rules.d/powerpc.mk
+++ b/debian/rules.d/powerpc.mk
@@ -15,3 +15,5 @@ no_dumpfile = true
 skipdbg		= true
 skipabi		= true
 skipmodule	= true
+
+family=ports
diff --git a/debian/rules.d/sparc.mk b/debian/rules.d/sparc.mk
index a8a7975..9912665 100644
--- a/debian/rules.d/sparc.mk
+++ b/debian/rules.d/sparc.mk
@@ -14,3 +14,5 @@ skipdbg		= true
 no_dumpfile	= true
 skipabi		= true
 skipmodule	= true
+
+family=ports
diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
index 3dbfbe2..b03d3f1 100755
--- a/debian/scripts/misc/kernelconfig
+++ b/debian/scripts/misc/kernelconfig
@@ -17,15 +17,17 @@ case "$mode" in
        exit 1 ;;
 esac
 kerneldir="`pwd`"
-confdir="debian/config"
+confdir="$kerneldir/debian/config"
 ports=$2
 if [ "$ports" = "ports" ]; then
-	archs=$(find $confdir -mindepth 1 -type d | cut -d'/' -f3)
+	archs="sparc powerpc ia64"
+	family='ports'
 else
 	archs="amd64 armel i386 lpia"
+	family='ubuntu'
 fi
 bindir="`pwd`/debian/scripts/misc"
-common_conf="$confdir/config.common.ubuntu"
+common_conf="$confdir/config.common.$family"
 tmpdir=`mktemp -d`
 
 test -d build || mkdir build
@@ -109,9 +111,8 @@ rm -f $common_conf
 # $tmpdir
 (cd $tmpdir; $bindir/splitconfig.pl)
 (
-	cd $kerneldir/$confdir;
-	grep -v 'is UNMERGABLE' <$tmpdir/config.common \
-		>$kerneldir/$confdir/config.common.ubuntu
+	cd $confdir;
+	grep -v 'is UNMERGABLE' <$tmpdir/config.common >$common_conf
 	for arch in $archs; do
 		grep -v 'is UNMERGABLE' <$tmpdir/config.common.$arch \
 			>$arch/config.common.$arch
-- 
1.6.3.rc3.199.g24398





More information about the kernel-team mailing list