SOURCES: kernel-config-update.py - do not rewrite lists, empty val...

glen glen at pld-linux.org
Tue Feb 5 21:45:37 CET 2008


Author: glen                         Date: Tue Feb  5 20:45:37 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- do not rewrite lists, empty value means deleted symbol

---- Files affected:
SOURCES:
   kernel-config-update.py (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: SOURCES/kernel-config-update.py
diff -u SOURCES/kernel-config-update.py:1.16 SOURCES/kernel-config-update.py:1.17
--- SOURCES/kernel-config-update.py:1.16	Tue Feb  5 21:35:55 2008
+++ SOURCES/kernel-config-update.py	Tue Feb  5 21:45:32 2008
@@ -188,6 +188,7 @@
     c = dict[symbol]
 #    sys.stderr.write("s=%s, c=%s\n" % (type(symbol), type(c)))
     if type(symbol) == int:
+        # comments
         print c
         continue
 
@@ -195,26 +196,16 @@
     # and remove from our arch.
     if not dotdict.has_key(symbol):
         c = dict[symbol]
-        # if there's 'all' key, expand it to available arch list
-        if c.has_key('all'):
-            value = c['all']
-            for a in allarch:
-                if not c.has_key(a):
-                    c[a] = value
-            del c['all']
-        if c.has_key(arch):
-            del c[arch]
+        if c.has_key('all') or c.has_key(arch):
+            c[arch] = ''
 
     # blacklist
     # TODO: use some list here instead
     if symbol == "LOCALVERSION":
         # .specs updates this
         continue
-#    if symbol == "MATH_EMULATION":
-#        # .spec keeps updating this
-#        continue
 
-    # join arch=value into string back
+    # join arch=value back into string
     s = ''
     for k in c.keys():
         s += ' %s=%s' % (k, c[k])
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-config-update.py?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list