From: Anas Nashif Date: Sun, 6 May 2012 12:58:18 +0000 (+0100) Subject: fixed pathes X-Git-Tag: 2.0_alpha~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=115cece465b47ee4b4f0d201e1147aa0265ac7ae;p=tools%2Fkickstarter.git fixed pathes --- diff --git a/kswriter/KSWriter.py b/kswriter/KSWriter.py index 7db3a62..69e228c 100644 --- a/kswriter/KSWriter.py +++ b/kswriter/KSWriter.py @@ -55,29 +55,30 @@ class KSWriter(): conf.update(lvald) #print conf postscript = "" + meta_root = os.path.dirname(self.image_filename) for scr in conf['PostScripts']: - if os.path.exists('./custom/scripts/%s.post' %scr): - f = open('./custom/scripts/%s.post' %scr, 'r') + if os.path.exists('%s/custom/scripts/%s.post' %(meta_root, scr)): + f = open('%s/custom/scripts/%s.post' %(meta_root, scr), 'r') postscript += f.read() postscript += "\n" f.close() else: - print './custom/scripts/%s.post not found, skipping.' %scr + print '%s/custom/scripts/%s.post not found, skipping.' %(meta_root,scr ) nochrootscript = "" for scr in conf['NoChrootScripts']: - if os.path.exists('./custom/scripts/%s.nochroot' %scr): - f = open('./custom/scripts/%s.nochroot' %scr, 'r') + if os.path.exists('%s/custom/scripts/%s.nochroot' %(meta_root,scr)): + f = open('%s/custom/scripts/%s.nochroot' %(meta_root, scr ), 'r') nochrootscript += f.read() nochrootscript += "\n" f.close() else: - print './custom/scripts/%s.nochroot not found, skipping.' %scr + print '%s/custom/scripts/%s.nochroot not found, skipping.' %(meta_root, scr ) ptab = "" for g in [ plat, img ]: if g.has_key("Part"): - f = open("./custom/part/%s" %g['Part'] ) + f = open("%s/custom/part/%s" %(meta_root, g['Part']) ) ptab = f.read() f.close() @@ -133,7 +134,7 @@ class KSWriter(): for path in self.image_meta['ExternalConfigs']: external_config_dir = os.path.join(os.path.dirname(self.image_filename), path) - for f in os.listdir(external_config_dir)): + for f in os.listdir(external_config_dir): if f.endswith('.yaml'): fp = file('%s/%s' %(external_config_dir, f), 'r') local = yaml.load(fp)