]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- allow basearch and specific arch
authorsparky <sparky@pld-linux.org>
Thu, 18 Sep 2008 16:33:20 +0000 (16:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kernel-config.awk -> 1.6

kernel-config.awk

index 0184cd0b688725f73a9c72f4b560d64704e1cfc4..da80c51eadaba9d54d2a9677f09a2a8e45c01791 100644 (file)
@@ -50,6 +50,13 @@ BEGIN {
                print "arch= must be specified" > "/dev/stderr"
                exit 1
        }
+       if ( ! basearch )
+               basearch = arch
+
+       targetLevel[ "all" ] = 1
+       targetLevel[ basearch ] = 2
+       targetLevel[ arch ] = 3
+
        shouldDie = 0
 }
 
@@ -100,15 +107,14 @@ function dieLater( code ) {
                } else {
                        split( line, archs )
                }
+
+               level = 0
                for ( i in archs ) {
                        split( archs[i], opt, "=" );
-                       if ( opt[1] == "all" )
-                               value = opt[2]
-
-                       if ( opt[1] == arch ) {
-                               # found best match, don't look further
+                       tl = targetLevel[ opt[ 1 ] ]
+                       if ( tl > level ) {
                                value = opt[2]
-                               break
+                               level = tl
                        }
                }
        }
This page took 0.056269 seconds and 4 git commands to generate.