SOURCES: kernel-config.py - make output-config optional (defaults ...

glen glen at pld-linux.org
Tue Jan 29 14:48:36 CET 2008


Author: glen                         Date: Tue Jan 29 13:48:36 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- make output-config optional (defaults to input-config)
- allow inline symbols (for current arch)

---- Files affected:
SOURCES:
   kernel-config.py (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SOURCES/kernel-config.py
diff -u SOURCES/kernel-config.py:1.9 SOURCES/kernel-config.py:1.10
--- SOURCES/kernel-config.py:1.9	Tue Jan 29 12:20:37 2008
+++ SOURCES/kernel-config.py	Tue Jan 29 14:48:30 2008
@@ -6,14 +6,18 @@
 import sys
 import re
 
-if len(sys.argv) != 5:
-    print "Usage: %s target_arch kernel.conf input-config output-config" % sys.argv[0]
+argc = len(sys.argv)
+if argc < 4 or argc > 5:
+    print "Usage: %s target_arch kernel.conf input-config [output-config]" % sys.argv[0]
     sys.exit(1)
 
 arch = sys.argv[1]
 kernelconfig = sys.argv[2]
 inconfig = sys.argv[3]
-outconfig = sys.argv[4]
+if argc == 5:
+    outconfig = sys.argv[4]
+else:
+    outconfig = inconfig
 
 from UserDict import UserDict
 
@@ -94,6 +98,12 @@
         rc = 1
         continue
 
+    # inline symbols: for current arch, duplicates allowed
+    if symbol.find('=') >= 0:
+        (symbol, value) = symbol.split('=')
+        dict[symbol] = value
+        continue
+
     hash = {}
     for item in c[1:]:
         try:
================================================================

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



More information about the pld-cvs-commit mailing list