diff mbox

[1/1] UBUNTU: 'fdr editconfig' modification. Easily skip over unwanted menuconfigs.

Message ID 4C0235A8.40406@canonical.com
State Superseded
Delegated to: Andy Whitcroft
Headers show

Commit Message

Lee Jones May 30, 2010, 9:53 a.m. UTC
All,

It is now easier to edit 'per-flavour' configuration files. The old
system forced the developer to enter a menuconfig system for each
flavour until eventually landing in the required one. After following
this process numerous times it can easily become tedious. Now the
developer is asked whether they want to enter each menuconfig in turn,
rapidly speeding up the process.

The following changes since commit f0819aaf4948e34a44d9d685615ddee74271cd70:
  Chase Douglas (1):
        UBUNTU: enforce CONFIG_TMPFS_POSIX_ACL=y

are available in the git repository at:

  git://kernel.ubuntu.com/lag/ubuntu-lucid.git editconfig

Lee Jones (1):
      UBUNTU: 'fdr editconfig' modification. Easily skip over unwanted
menuconfigs.

 debian/scripts/misc/kernelconfig |   75
+++++++++++++++++++++-----------------
 1 files changed, 42 insertions(+), 33 deletions(-)


+                               ;;
                esac
        done
 
@@ -87,20 +84,32 @@ for arch in $archs; do
                        # Call oldconfig or menuconfig
                        case "$mode" in
                            oldconfig)
-                               # Weed out incorrect config parameters
-                               echo "* Run silentoldconfig on
$arch/$config ..."
-                               make O=`pwd`/build ARCH=$kernarch
silentoldconfig ;;
+                                   # Weed out incorrect config parameters
+                                       echo "* Run silentoldconfig on
$arch/$config ..."
+                                       make O=`pwd`/build
ARCH=$kernarch silentoldconfig ;;
                            defaultconfig)
-                               # Weed out incorrect config parameters
-                               echo "* Run oldconfig on $arch/$config ..."
-                               make O=`pwd`/build ARCH=$kernarch
oldconfig ;;
+                                   # Weed out incorrect config parameters
+                                       echo "* Run oldconfig on
$arch/$config ..."
+                                       make O=`pwd`/build
ARCH=$kernarch oldconfig ;;
                            editconfig)
-                               # Interactively edit config parameters
-                               echo " * Run menuconfig on
$arch/$config... Press a key."
-                               read
-                               make O=`pwd`/build ARCH=$kernarch
menuconfig ;;
+                                   # Interactively edit config parameters
+                                       while : ; do
+                                               echo -n "Do you want to
edit config: $arch/$config? [Y/n] "
+                                               read choice
+                                              
+                                               case "$choice" in
+                                                       y* | Y* | "" )
+                                                               make
O=`pwd`/build ARCH=$kernarch menuconfig
+                                                               break ;;
+                                                       n* | N* )
+                                                               break ;;
+                                                       *)
+                                                               echo
"Entry not valid"
+                                               esac
+                                       done
+                                       ;;
                            *)  # Bad!
-                               exit 1 ;;
+                                       exit 1 ;;
                        esac
                        cat build/.config > $archconfdir/$config
                        cat build/.config > "$tmpdir/CONFIGS/$arch-$config"

Kind regards,
Lee
diff mbox

Patch

diff --git a/debian/scripts/misc/kernelconfig
b/debian/scripts/misc/kernelconfig
index 71c0f5e..7884bdc 100755 (executable)
--- a/debian/scripts/misc/kernelconfig
+++ b/debian/scripts/misc/kernelconfig
@@ -13,12 +13,12 @@  fi
 
 mode=${1:?"Usage: $0 [oldconfig|editconfig]"}
 case "$mode" in
-    oldconfig)  ;; # All is good
+    oldconfig)      ;; # All is good
     defaultconfig)  ;; # All is good
-    editconfig) ;; # All is good
-    genconfig)  ;; # All is good
-    *) echo "$0 called with invalid mode" 1>&2
-       exit 1 ;;
+    editconfig)     ;; # All is good
+    genconfig)      ;; # All is good
+    *)  echo "$0 called with invalid mode" 1>&2
+               exit 1 ;;
 esac
 kerneldir="`pwd`"
 confdir="$kerneldir/${DEBIAN}/config"
@@ -48,12 +48,9 @@  for arch in $archs; do
                lpia)   kernarch="x86"          ;;
                sparc)  kernarch="sparc64"      ;;
                armel)  kernarch="arm"          ;;
-               *)      kernarch="$arch"        ;;
+               *)          kernarch="$arch"    ;;
        esac
 
-       echo ""
-       echo "***************************************"
-       echo "* Processing $arch ($kernarch) ... "
        archconfdir=$confdir/$arch
        flavourconfigs=$(cd $archconfdir && ls config.flavour.*)
 
@@ -64,19 +61,19 @@  for arch in $archs; do
        for config in $flavourconfigs; do
                fullconf="$tmpdir/$arch-$config-full"
                case $config in
-               *)
-                       : >"$fullconf"
-                       if [ -f $common_conf ]; then
-                               cat $common_conf >> "$fullconf"
-                       fi
-                       if [ -f $archconfdir/config.common.$arch ]; then
-                               cat $archconfdir/config.common.$arch >>
"$fullconf"
-                       fi
-                       cat "$archconfdir/$config" >>"$fullconf"
-                       if [ -f $confdir/OVERRIDES ]; then
-                               cat $confdir/OVERRIDES >> "$fullconf"
-                       fi
-                       ;;
+                       *)
+                               : >"$fullconf"
+                               if [ -f $common_conf ]; then
+                                       cat $common_conf >> "$fullconf"
+                               fi
+                               if [ -f $archconfdir/config.common.$arch
]; then
+                                       cat
$archconfdir/config.common.$arch >> "$fullconf"
+                               fi
+                               cat "$archconfdir/$config" >>"$fullconf"
+                               if [ -f $confdir/OVERRIDES ]; then
+                                       cat $confdir/OVERRIDES >>
"$fullconf"
+                               fi