From 2459137316afb0d47db53e66fff94dd1c5ffecb8 Mon Sep 17 00:00:00 2001
From: Chris Larson <kergoth@openedhand.com>
Date: Thu, 10 Aug 2006 06:42:29 +0000
Subject: Bugfix in the jhbuild emitter: wasn't properly emitting for templated
 packages.

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@598 311d38ba-8fff-0310-9ca6-ca027cbcb966
---
 scripts/jhbuild/rewrite.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'scripts')

diff --git a/scripts/jhbuild/rewrite.py b/scripts/jhbuild/rewrite.py
index ecd644486..ef292763d 100755
--- a/scripts/jhbuild/rewrite.py
+++ b/scripts/jhbuild/rewrite.py
@@ -226,7 +226,7 @@ class Emitter(object):
             f.close()
 
             for key in bb.data.keys(package):
-                fdata.replace('@@'+key+'@@', bb.data.getVar(key, package))
+                fdata = fdata.replace('@@'+key+'@@', bb.data.getVar(key, package))
         else:
             for key in bb.data.keys(package):
                 if key == '_handler':
@@ -266,10 +266,12 @@ def _test():
 
     emitter = Emitter(filefunc)
     for package in handlers.packages:
-        template = os.path.join(emitter.filefunc(package), '.in')
+        template = emitter.filefunc(package) + '.in'
         if os.path.exists(template):
+            print("%s exists, emitting based on template" % template)
             emitter.write(package, template)
         else:
+            print("%s does not exist, emitting non-templated" % template)
             emitter.write(package)
 
 if __name__ == "__main__":
-- 
cgit v1.2.3