summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
committerRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
commitb26a945734ce271aa7d443ff9e96fe2851b21138 (patch)
treef540b8d58a7411cf0cabe5c8f4ad40f9f597352a /bitbake/lib/bb/__init__.py
parent3cd47ad235d54a9c539ae6fe4a5a2b4b5f7e5621 (diff)
downloadpoky-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.gz
Update to latest bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r--bitbake/lib/bb/__init__.py34
1 files changed, 1 insertions, 33 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index dabe978bf5..c6c0beb792 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -23,7 +23,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
23Place, Suite 330, Boston, MA 02111-1307 USA. 23Place, Suite 330, Boston, MA 02111-1307 USA.
24""" 24"""
25 25
26__version__ = "1.3.3.0" 26__version__ = "1.3.3.4"
27 27
28__all__ = [ 28__all__ = [
29 29
@@ -1229,38 +1229,6 @@ class digraph:
1229 mygraph.okeys=self.okeys[:] 1229 mygraph.okeys=self.okeys[:]
1230 return mygraph 1230 return mygraph
1231 1231
1232#######################################################################
1233#######################################################################
1234#
1235# SECTION: Config
1236#
1237# PURPOSE: Reading and handling of system/target-specific/local configuration
1238# reading of package configuration
1239#
1240#######################################################################
1241#######################################################################
1242
1243def reader(cfgfile, feeder):
1244 """Generic configuration file reader that opens a file, reads the lines,
1245 handles continuation lines, comments, empty lines and feed all read lines
1246 into the function feeder(lineno, line).
1247 """
1248
1249 f = open(cfgfile,'r')
1250 lineno = 0
1251 while 1:
1252 lineno = lineno + 1
1253 s = f.readline()
1254 if not s: break
1255 w = s.strip()
1256 if not w: continue # skip empty lines
1257 s = s.rstrip()
1258 if s[0] == '#': continue # skip comments
1259 while s[-1] == '\\':
1260 s2 = f.readline()[:-1].strip()
1261 s = s[:-1] + s2
1262 feeder(lineno, s)
1263
1264if __name__ == "__main__": 1232if __name__ == "__main__":
1265 import doctest, bb 1233 import doctest, bb
1266 doctest.testmod(bb) 1234 doctest.testmod(bb)