Add support for Tizen IVI repo 70/24970/1
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Thu, 24 Jul 2014 13:31:42 +0000 (15:31 +0200)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Thu, 24 Jul 2014 13:31:42 +0000 (15:31 +0200)
Change-Id: I14f28f35185bd75b567b376a51f542a16a08414c
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
proto-meta-Tizen_generic/.spec2yoctorc
tools/spec2yocto.py

index a7d6a4a..e6108d4 100644 (file)
@@ -5,6 +5,7 @@ current=tizen-common
 working_dir=${YOCTO_WORKDIR}/tizen/proto-meta-Tizen_generic
 manifest=tizen_common_manifest, tizen_common_fix
 arch=x86_64
+buildtarget=x86_64-wayland
 runtime_blacklist=runtime_tizen_common_blacklist
 native_blacklist=native_tizen_common_blacklist
 blacklist=tizen_common_blacklist, tmp_tizen_common_blacklist
@@ -21,6 +22,11 @@ uri=http://download.tizen.org/snapshots/tizen/common/latest/
 default_git_src=review.tizen.org
 priority=0
 
+[tizen_ivi_manifest]
+uri=http://download.tizen.org/snapshots/tizen/ivi/ivi/latest/
+default_git_src=review.tizen.org
+priority=0
+
 [tizen_common_fix]
 uri=https://raw.githubusercontent.com/eurogiciel-oss/openTizen_manifest_addon/master/Tizen/Common/devel/yocto/manifest_fix.xml
 default_git_src=review.tizen.org
index 7534ff1..9df3478 100755 (executable)
@@ -128,6 +128,12 @@ class Spec2yoctoConfig( object ):
         '''
         return self.__get_value( projet, "arch", None )
 
+    def get_project_buildtarget(self, projet):
+        '''
+        return the default buildtarget of the project.
+        '''
+        return self.__get_value( projet, "buildtarget", None )
+
     def get_working_dir( self, projet ):
         '''
         return the working dir of the project.
@@ -2073,6 +2079,17 @@ def get_project_arch( xml ):
 
     return arch_list
 
+def get_project_buildtarget(xml):
+    aElement = ElementTree.fromstring(xml)
+    buildtarget_list = []
+    for value in aElement:
+        for project in value.getiterator():
+            if project.tag == "buildtargets":
+                for buildtarget in project.getiterator():
+                    if buildtarget.tag == "buildtarget":
+                        buildtarget_list.append(buildtarget.text)
+
+    return buildtarget_list
 
 def clean_name( raw_name ):
     if "_" in raw_name:
@@ -2332,9 +2349,10 @@ class manifestCollection:
                     xml_str = download_build_xml( meta_manifest_uri )
                     project_id = get_project_id( xml_str )
                     list_arch = get_project_arch( xml_str )
+                    list_buildtarget = get_project_buildtarget(xml_str)
 
                     arch = SPEC2YOCTO_CONFIG.get_project_arch( self.__my_project )
-                    buildtarget = "x86_64-wayland"
+                    buildtarget = SPEC2YOCTO_CONFIG.get_project_buildtarget(self.__my_project)
 
                     if ( arch == "i586" ) and ( "ia32" in list_arch ):
                         arch = "ia32"