don't install mic on centos and give error if mic does not exist
authorZhang Qiang <qiang.z.zhang@intel.com>
Thu, 16 May 2013 07:30:33 +0000 (15:30 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Thu, 16 May 2013 08:29:23 +0000 (16:29 +0800)
Currently, CentOS has not been supportted by mic, so user have to
install mic manually on CentOS

Change-Id: I9f245b34b6dcb1f6df1f7b7565fb3efa16b50b82

gitbuildsys/cmd_createimage.py
packaging/gbs.spec

index f7fa60c..64cdb4e 100644 (file)
@@ -38,6 +38,10 @@ def createimage(args, ks_file):
 
 def main(args):
     '''main entrance for createimage'''
+    try:
+       import mic
+    except ImportError:
+        raise GbsError('please install mic manually first')
 
     if not os.path.exists(args.ks_file):
         raise GbsError('specified ks file %s does not exist' % args.ks_file)
index 9e5f777..67985da 100644 (file)
@@ -15,7 +15,9 @@ Requires:   sudo
 Requires:   osc >= 0.139.0
 Requires:   tizen-gbp-rpm >= 20130403
 Requires:   depanneur >= 0.7
+%if ! 0%{?centos_version:1}
 Requires:   mic >= 0.18
+%endif
 
 %if "%{?python_version}" < "2.7"
 Requires:   python-argparse