Remove BUSYBOX_CONFIG from genkernel.conf
authorAndrew Gaffney <agaffney@gentoo.org>
Fri, 12 Dec 2008 19:21:28 +0000 (13:21 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Fri, 12 Dec 2008 19:21:28 +0000 (13:21 -0600)
Add search order for busy-config: user-specified, defaults/busy-config, arch/%%ARCH%%/busy-config

ChangeLog
gen_compile.sh
genkernel.conf

index a392510494c19edc0532ffbc1be71c21df780f81..9f3cb0b837e13a2e2d7b57ebae95965c177ed0d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
 # Distributed under the GPL v2
 
+  12 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_compile.sh,
+  genkernel.conf:
+  Remove BUSYBOX_CONFIG from genkernel.conf Add search order for
+  busy-config: user-specified, defaults/busy-config,
+  arch/%%ARCH%%/busy-config
+
   12 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> -arch/x86/nb-busybox.cf,
   -defaults/nb-busybox.cf:
   Remove old nb-busybox.cf files that aren't used anymore
index d9083a7e7006abb6e2c3c685cafc1d685cb81033..a9066e64e902db7dbd126895633d49b2db92180b 100644 (file)
@@ -323,8 +323,20 @@ compile_kernel() {
 compile_busybox() {
        [ -f "${BUSYBOX_SRCTAR}" ] ||
                gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
-       [ -f "${BUSYBOX_CONFIG}" ] ||
-               gen_die "Cound not find busybox config file: ${BUSYBOX_CONFIG}!"
+
+       if [ -n "${BUSYBOX_CONFIG}" ]
+       then
+               [ -f "${BUSYBOX_CONFIG}" ] ||
+                       gen_die "Could not find busybox config file: ${BUSYBOX_CONFIG}"
+       elif [ -f "${GK_SHARE}/defaults/busy-config" ]
+       then
+               BUSYBOX_CONFIG="${GK_SHARE}/defaults/busy-config"
+       elif [ -f "$(arch_replace "${GK_SHARE}/arch/%%ARCH%%/busy-config")" ]
+       then
+               BUSYBOX_CONFIG="$(arch_replace "${GK_SHARE}/arch/%%ARCH%%/busy-config")"
+       else
+               gendie "Could not find a busybox config file"
+       fi
 
        # Delete cache if stored config's MD5 does not match one to be used
        if [ -f "${BUSYBOX_BINCACHE}" ]
index f6a8ad69b602879e70df3c4ec98e1d55b559c52a..2064bbf9c13f8915f853ad2be2ddc1af6d32590f 100755 (executable)
@@ -134,9 +134,6 @@ DEFAULT_KERNEL_SOURCE="/usr/src/linux"
 # arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
 # DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"
 
-# Configuration file for busybox
-BUSYBOX_CONFIG="${GK_SHARE}/arch/%%ARCH%%/busy-config"
-
 BUSYBOX_VER="VERSION_BUSYBOX"
 BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2"
 BUSYBOX_DIR="busybox-${BUSYBOX_VER}"