]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- allow empty value to skip symbol on this arch
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 5 Feb 2008 00:03:32 +0000 (00:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- if unknown value found exit after processing the file

Changed files:
    kernel-config.py -> 1.13

kernel-config.py

index 4e5428b57b2fdfc0c49031bb5ac7c342ba53cc11..eb68d3da81321fa70ab6809108bb840315f51408 100644 (file)
@@ -121,7 +121,9 @@ for l in f:
 
     # take arch line, otherwise fallback to 'all'
     if hash.has_key(arch):
-        dict[symbol] = hash[arch]
+        # allow empty value to skip symbol on this arch
+        if not hash[arch] == "":
+            dict[symbol] = hash[arch]
     else:
         if hash.has_key('all'):
             dict[symbol] = hash['all']
@@ -135,6 +137,7 @@ f = open(inconfig, 'r')
 cfg = f.read()
 f.close()
 
+rc = 0
 cfg += '\n# PLD configs\n'
 for symbol in dict.items():
     (key, val) = symbol
@@ -159,7 +162,10 @@ for symbol in dict.items():
         cfg += "CONFIG_%s=%s\n" % (key, val)
     else:
         print "Unknown value [%s] for key: %s" % (val, key)
-        sys.exit(1)
+        rc = 1
+
+if not rc == 0:
+    sys.exit(rc)
 
 f = open(outconfig, 'w')
 f.write(cfg)
This page took 0.073938 seconds and 4 git commands to generate.