SOURCES: kernel-config.py - print all errors that we can find and ...
glen
glen at pld-linux.org
Mon Jan 28 20:42:46 CET 2008
Author: glen Date: Mon Jan 28 19:42:45 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- print all errors that we can find and then exit with error
---- Files affected:
SOURCES:
kernel-config.py (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SOURCES/kernel-config.py
diff -u SOURCES/kernel-config.py:1.5 SOURCES/kernel-config.py:1.6
--- SOURCES/kernel-config.py:1.5 Mon Jan 28 17:47:48 2008
+++ SOURCES/kernel-config.py Mon Jan 28 20:42:40 2008
@@ -71,20 +71,27 @@
dict = odict()
+rc = 0
f = open(kernelconfig, 'r')
for l in f:
if l[:6] == 'CONFIG_':
print "Omit CONFIG_ when specifing symbol name: %s" % l
+ rc = 1
continue
+
if re.match('^#', l) or re.match('^\s*$', l):
continue
+
if not re.match('^[0-9A-Z]+', l):
print "Unknown line: %s" % l
- sys.exit(1)
+ rc = 1
+ continue
+
c = l.strip().split()
symbol = c[0]
if dict.has_key(symbol):
print "Duplicate symbol %s!" % symbol
+ rc = 1
continue
par = False
@@ -104,10 +111,14 @@
dict[symbol] = val
if not par:
print "Unknown line: %s" % l
- sys.exit(1)
+ rc = 1
+ continue
f.close()
+if not rc == 0:
+ sys.exit(1)
+
f = open(inconfig, 'r')
cfg = f.read()
f.close()
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-config.py?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list