[TIC-CORE] support caching for analysis data
[archive/20170607/tools/tic-core.git] / tic / parser / recipe_parser.py
index e9049d4..6ddd176 100644 (file)
@@ -34,7 +34,7 @@ def get_default_recipe():
             Baseline= 'tizen-3.0',
             Active= True,
             Mic2Options= '-f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap',
-            Part='mobile-mbr',
+            Part='headless',
             Language= 'en_US.UTF-8',
             Keyboard= 'us',
             Timezone= 'Asia/Seoul',
@@ -50,61 +50,43 @@ def get_default_recipe():
             SaveRepos= False,
             UserGroups= "audio,video"
         ),
-        Emulator64wayland=dict(
-            Part='mobile-mbr',
+        Wayland=dict(
+            Part='headless',
             UserGroups='audio,video',
-            Groups=[
-                'Generic Base',
-                'Mobile Base',
-                'Mobile Console Tools',
-                'Mobile Adaptation',
-                'Mobile Wayland',
-                'Mobile Middleware',
-                'Mobile Applications',
-                'Generic Multimedia',
-                'Mobile Multimedia',
-                'Generic Desktop Applications',
-                'Mobile Dali',
-                'Mobile EFL',
-                'Mobile Enlightenment',
-                'Mobile Input Framework',
-                'Mobile Connectivity Framework',
-                'Mobile Bluetooth',
-                'Mobile Web Framework',
-                'Mobile Telephony'],
+            Groups=[],
             PostScripts=[],
             Repos= [],
             NoChrootScripts=[]
         ),
         Configurations=[
             dict(
-                Name='mobile-emulator64-wayland',
-                Architecture='x86_64',
+                Name='tizen-headless',
+                Architecture='armv7l',
                 Schedule= "*",
                 Active= True,
-                Platform= 'Emulator64wayland',
-                Part= 'mobile-2parts-emulator',
+                Platform= 'Wayland',
+                Part= 'headless',
                 Mic2Options= '-f loop --pack-to=@NAME@.tar.gz',
-                FileName= 'mobile-emulator64-wayland',
-                Repos=['mobile-emulator64-wayland', 'base_emulator64'],
-                Groups=['Mobile Adaptation Emulator'],
+                FileName= 'tizen-headless-tm1',
+                Repos=['tizen-unified', 'tizen-base'],
+                Groups=[],
                 ExtraPackages= [],
                 RemovePackages=[]
             )
         ],
         Repositories=[
-            dict(Name='mobile-emulator64-wayland',
-                 Url='http://download.tizen.org/snapshots/tizen/mobile/latest/repos/emulator64-wayland/packages/',
+            dict(Name='tizen-unified',
+                 Url='http://download.tizen.org/live/devel:/Tizen:/Unified/standard/',
                  Options='--ssl_verify=no'),
-            dict(Name='base_emulator64',
-                 Url='http://download.tizen.org/snapshots/tizen/base/latest/repos/emulator64/packages/',
+            dict(Name='tizen-base',
+                 Url='http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/',
                  Options='--ssl_verify=no')
         ],
         Partitions=[
-            dict(Name='mobile-mbr',
-                 Contents='part / --fstype="ext4" --size=3584 --ondisk=sda --active --label platform --fsoptions=defaults,noatime'),
-            dict(Name= 'mobile-2parts-emulator',
-                 Contents='part / --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-rootfs\npart /opt/ --size=2000 --ondisk=sda --fstype=ext4 --label=emulator-sysdata')
+            dict(Name='headless',
+                 Contents='part / --size=2000 --ondisk mmcblk0p --fstype=ext4 --label=rootfs --extoptions=\"-J size=16\" \n\
+part /opt/ --size=1000 --ondisk mmcblk0p --fstype=ext4 --label=system-data --extoptions="-m 0" \n\
+part /boot/kernel/mod_tizen_tm1/lib/modules --size=12 --ondisk mmcblk0p --fstype=ext4 --label=modules \n')
         ]
     )
     return recipe
@@ -140,14 +122,14 @@ def convert_recipe_to_yaml(recipe, filepath):
     
     # configs.yaml
     with open(yamlinfo.configs, 'w') as outfile:
-        yaml.dump(config, outfile, default_flow_style=False)
+        yaml.safe_dump(config, outfile, default_flow_style=False)
 
     # repo.yaml
     if 'Repositories' in recipe:
         repos = {}
         repos['Repositories'] = recipe['Repositories']
         with open(yamlinfo.repos, 'w') as outfile:
-            yaml.dump(repos, outfile, default_flow_style=False)
+            yaml.safe_dump(repos, outfile, default_flow_style=False)
     
     # partition info
     if 'Partitions' in recipe: