<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>modules/flexdata4.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@ __license__=&quot;&quot;&quot; Distributed under the terms of the GNU General Public License ve
  redistribute it under certain conditions. See /usr/lib/metro/LICENSE for details.
 &quot;&quot;&quot;
 __status__=&quot;Release&quot;
-__version__=&quot;1.3&quot;
+__version__=&quot;1.4.2&quot;
 
 def usage():
 	version()
@@ -119,16 +119,7 @@ def main():
 	for opt,optarg in opts:
 		optdict[opt]=optarg
 
-	# Step 1: check for &quot;special&quot; help/version options, handle them and exit:
-
-	if optdict.has_key(&quot;-h&quot;) or optdict.has_key(&quot;--help&quot;):
-		usage()
-		sys.exit(1)
-	elif optdict.has_key(&quot;-V&quot;) or optdict.has_key(&quot;--version&quot;):
-		version()
-		sys.exit(1)
-
-	# Step 2: parse optional arguments that affect behavior of the program
+	# Step 1: parse optional arguments that affect behavior of the program
 
 	if optdict.has_key(&quot;-d&quot;) or optdict.has_key(&quot;--debug&quot;):
 		debug=True
@@ -158,6 +149,16 @@ def main():
 	# for MetroError:
 	from catalyst_support import MetroError
 
+	# Step 2: check for &quot;special&quot; help/version options, handle them and exit:
+
+	if optdict.has_key(&quot;-h&quot;) or optdict.has_key(&quot;--help&quot;):
+		usage()
+		sys.exit(1)
+	elif optdict.has_key(&quot;-V&quot;) or optdict.has_key(&quot;--version&quot;):
+		version()
+		sys.exit(1)
+
+
 	# Step 3: check for duplicate main options, which is an error
 
 	mainargs=0
@@ -207,9 +208,6 @@ def main():
 
 try:
 	main()
-except MetroError:
-	raise
-	sys.exit(1)
 except KeyboardInterrupt:
 	print &quot;\n&quot; + __app__ +&quot; build aborted due to user interrupt (ctrl-C)&quot;
 	print</diff>
      <filename>metro</filename>
    </modified>
    <modified>
      <diff>@@ -224,12 +224,9 @@ class metroParsedFile:
 		return self.filename
 
 	def parse(self):
-		# Using globals isn't always the best programming practice, but in our case of a single-threaded
-		# parser, it is a handy way to allow various parts of the parser to access relevant information
-		# without passing arguments all over the place.
-
-		global prevlineno
-		global lineno
+		
+		global endline 
+		global line
 		global curline
 		global filename
 
@@ -355,17 +352,18 @@ class metroParsedFile:
 				self.namespace.add(singleLineElement(self.section,varname,&quot; &quot;.join(mysplit[1:])),self.cg)
 			else:
 				raise ParseError(&quot;invalid line&quot;)
-class element:
-	def __init__(self,section,varname,rawvalue):
 
-		global filename
-		global lineno
 
+class element:
+	def __init__(self,varname,rawvalue,context):
+	
+		self.filename, self.section, self.lineno = context
+		
 		if varname == &quot;:&quot;:
 			# Properly handle $[:]
 			varname = &quot;&quot;
-		if section != &quot;&quot;:
-			self.varname = section + &quot;/&quot; + varname
+		if self.section != &quot;&quot;:
+			self.varname = self.section + &quot;/&quot; + varname
 			if self.varname[-1] == &quot;/&quot;:
 				self.varname = self.varname[:-1]
 		else:
@@ -373,10 +371,6 @@ class element:
 
 		self.rawvalue = rawvalue
 
-		self.filename = filename
-		self.lineno = lineno
-		self.section = section
-
 	def name(self):
 		return self.varname
 
@@ -385,12 +379,8 @@ class element:
 
 class singleLineElement(element):
 
-	def __init__(self,section,varname,rawvalue):
-		element.__init__(self,section,varname,rawvalue)
-
-	def expand(self):
-		gen = self.getExpansion()
-		newstring = &quot;&quot;
+	def __init__(self,varname,rawvalue,context):
+		element.__init__(self,varname,rawvalue,context)
 
 	def getExpansion(self):
 		pos = 0
@@ -410,12 +400,12 @@ class singleLineElement(element):
 			yield(rv[found:found2+1])
 
 class multiLineElement(element):
-	def __init__(self,section,varname,rawvalue):
-
-		global prevlineno
+	def __init__(self,varname,rawvalue,context):
+		
+		self.endline = context[-1]
+		context = context[:-1]
 
-		self.endline = prevlineno
-		element.__init__(self,section,varname,rawvalue)
+		element.__init__(self,varname,rawvalue,context)
 
 if __name__ == &quot;__main__&quot;:
 	coll = metroCollection()</diff>
      <filename>modules/flexdata2.py</filename>
    </modified>
    <modified>
      <diff>@@ -184,7 +184,7 @@ class metroParsedFile:
 						lineno += 1
 						mysplit = curline[:-1].strip().split(&quot; &quot;)
 						if len(mysplit) == 1 and mysplit[0] == &quot;]&quot;:
-							self.namespace.add(multiLineElement(self.section,varname,mylines))
+							self.namespace.add(multiLineElement(self.section,varname,self.namespace,mylines))
 							break
 						else:
 							mylines.append(curline)
@@ -346,12 +346,14 @@ class singleLineElement(element):
 
 
 class multiLineElement(element):
-	def __init__(self,section,varname,rawvalue):
+	def __init__(self,section,varname,namespace,mylines):
 
 		global prevlineno
-
+		self.lines=mylines
 		self.endline = prevlineno
-		element.__init__(self,section,varname,rawvalue)
+		element.__init__(self,section,varname,namespace)
+	def __repr__(self):
+		return repr(self.lines)
 
 if __name__ == &quot;__main__&quot;:
 	coll = collection()</diff>
      <filename>modules/flexdata3.py</filename>
    </modified>
    <modified>
      <diff>@@ -99,7 +99,7 @@ chroot/run: [
 	mknod /lib/udev/devices/urandom c 1 9 || exit 10
 	mknod /lib/udev/devices/random c 1 8 || exit 10
 	mknod /lib/udev/devices/zero c 1 5 || exit 10
-	
+
 	# OpenRC - prior to 0.3.0
 	# cp /etc/rc.conf /etc/rc.conf.orig || exit 11
 	# cat /etc/rc.conf.orig | sed -e &quot;/^#rc_devices/c\\&quot; -e 'rc_devices=&quot;static&quot;' &gt; /etc/rc.conf || exit 12</diff>
      <filename>targets/gentoo/openvz.spec</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ if [ &quot;$[emerge/packages?]&quot; = &quot;yes&quot; ]
 then
 	emerge $eopts $[emerge/packages:lax] || exit 1
 fi
-if [ &quot;$[metro/build]&quot; = &quot;funtoo&quot; ]
+if [ &quot;$[metro/build]&quot; = &quot;funtoo&quot; ] || [ &quot;$[metro/build]&quot; = &quot;~funtoo&quot; ]
 then
 	eselect vi set busybox
 fi</diff>
      <filename>targets/gentoo/stage3.spec</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>774803242b49c55da9bf67acf31caf17feca33a2</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Robbins</name>
    <email>drobbins@funtoo.org</email>
  </author>
  <url>http://github.com/funtoo/metro/commit/5f69a7ae0215cb244c59bd20a75b0f15c4a6a2df</url>
  <id>5f69a7ae0215cb244c59bd20a75b0f15c4a6a2df</id>
  <committed-date>2009-07-04T22:10:08-07:00</committed-date>
  <authored-date>2009-07-04T22:10:08-07:00</authored-date>
  <message>misc small fixes</message>
  <tree>4211131a2129df72873b6839af39a3844337bada</tree>
  <committer>
    <name>Daniel Robbins</name>
    <email>drobbins@funtoo.org</email>
  </committer>
</commit>
