only set work dir as dirname of gbs conf if work dir is not '.'
authorZhang Qiang <qiang.z.zhang@intel.com>
Thu, 20 Jun 2013 15:58:18 +0000 (23:58 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 20 Jun 2013 15:58:18 +0000 (23:58 +0800)
If work_dir already set the correct path instead of '.', gbs should
not reset it

Change-Id: Iebae6b07ef2462adcffc21bc39b61c48fa42dbf4

gitbuildsys/conf.py

index 077235a94c53c49f119553497621b3941db45f14..cf5edcf71f7cd89daaecc9084d8c59ab6e0a5192 100644 (file)
@@ -259,7 +259,8 @@ url = http://download.tizen.org/releases/daily/trunk/ivi/latest/
             try:
                 cfgparser.read_one(fpath)
                 if cfgparser.has_section('general') and \
-                   cfgparser.has_option('general', 'work_dir'):
+                   cfgparser.has_option('general', 'work_dir') and \
+                   cfgparser.get('general', 'work_dir') == '.':
                     cfgparser.set('general', 'work_dir',
                                   os.path.abspath(os.path.dirname(fpath)))
             except Error, err: