Author: sparky                       Date: Thu Sep 18 16:33:26 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- allow basearch and specific arch

---- Files affected:
SOURCES:
   kernel-config.awk (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SOURCES/kernel-config.awk
diff -u SOURCES/kernel-config.awk:1.5 SOURCES/kernel-config.awk:1.6
--- SOURCES/kernel-config.awk:1.5       Thu Sep 18 17:01:59 2008
+++ SOURCES/kernel-config.awk   Thu Sep 18 18:33:20 2008
@@ -50,6 +50,13 @@
                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 @@
                } 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
                        }
                }
        }
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-config.awk?r1=1.5&r2=1.6&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to