SOURCES: kernel-config-update.py - print to stderr
glen
glen at pld-linux.org
Tue Feb 5 17:47:31 CET 2008
Author: glen Date: Tue Feb 5 16:47:31 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- print to stderr
---- Files affected:
SOURCES:
kernel-config-update.py (1.13 -> 1.14)
---- Diffs:
================================================================
Index: SOURCES/kernel-config-update.py
diff -u SOURCES/kernel-config-update.py:1.13 SOURCES/kernel-config-update.py:1.14
--- SOURCES/kernel-config-update.py:1.13 Tue Feb 5 01:34:38 2008
+++ SOURCES/kernel-config-update.py Tue Feb 5 17:47:26 2008
@@ -6,6 +6,7 @@
import sys
import re
+from UserDict import UserDict
if len(sys.argv) != 4:
print "Usage: %s target_arch kernel.conf .config" % sys.argv[0]
@@ -15,8 +16,6 @@
kernelconf = sys.argv[2]
dotconfig = sys.argv[3]
-from UserDict import UserDict
-
# odict (Ordered Dict) from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
class odict(UserDict):
def __init__(self, dict = None):
@@ -77,7 +76,7 @@
allarch = {}
for l in f:
if l[:6] == 'CONFIG_':
- print "Omit CONFIG_ when specifing symbol name: %s" % l
+ sys.stderr.write("Omit CONFIG_ when specifing symbol name: %s\n" % l)
rc = 1
continue
@@ -87,14 +86,14 @@
continue
if not re.match('^[0-9A-Z]+', l):
- print "Unknown line: %s" % l
+ sys.stderr.write("Unknown line: %s\n" % l)
rc = 1
continue
c = l.strip().split()
symbol = c[0]
if dict.has_key(symbol):
- print "Duplicate symbol: %s" % symbol
+ sys.stderr.write("Duplicate symbol: %s\n" % symbol)
rc = 1
continue
@@ -105,11 +104,10 @@
allarch[key] = 1
dict[symbol][key] = value
-# print "Add symbol: %s=%s" % (symbol, dict[symbol])
+# sys.stderr.write("Add symbol: %s=%s\n" % (symbol, dict[symbol]))
f.close()
del allarch['all']
-#rc =1
if not rc == 0:
sys.exit(1)
@@ -134,7 +132,7 @@
continue
dotdict[symbol] = value
-# print "Add .config symbol: %s=%s" % (symbol, dotdict[symbol])
+# sys.stderr.write("Add .config symbol: %s=%s\n" % (symbol, dotdict[symbol]))
f.close()
@@ -177,7 +175,7 @@
# printout time
for symbol in dict.keys():
c = dict[symbol]
-# print "s=%s, c=%s" % (type(symbol), type(c))
+# sys.stderr.write("s=%s, c=%s\n" % (type(symbol), type(c)))
if type(symbol) == int:
print c
continue
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-config-update.py?r1=1.13&r2=1.14&f=u
More information about the pld-cvs-commit
mailing list