summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRonan Le Martret <ronan@fridu.net>2013-11-12 12:54:13 +0100
committerRonan Le Martret <ronan@fridu.net>2013-12-20 11:13:47 +0100
commit203b2b6ec1b843e2c0a633aef2c113a14f3e84e7 (patch)
treeaea8b7cb8655af3974babb8d4ff90548e4c133b2 /tools
parent0c754b7d509c60a2a257e7cda647dcb2b58cda30 (diff)
downloadtizen-203b2b6ec1b843e2c0a633aef2c113a14f3e84e7.tar.gz
tizen-203b2b6ec1b843e2c0a633aef2c113a14f3e84e7.tar.bz2
tizen-203b2b6ec1b843e2c0a633aef2c113a14f3e84e7.zip
- update Tizen IVI build .
Signed-off-by: Ronan Le Martret <ronan@fridu.net> - update project yocto ivi. - update project yocto ivi. - update project yocto ivi.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gitCloneAll.sh69
-rwxr-xr-xtools/spec2yocto.py33
2 files changed, 97 insertions, 5 deletions
diff --git a/tools/gitCloneAll.sh b/tools/gitCloneAll.sh
index a2a890d3f..7131ec3f4 100755
--- a/tools/gitCloneAll.sh
+++ b/tools/gitCloneAll.sh
@@ -1,5 +1,28 @@
#!/bin/bash
-cd /home/ronanguirec/yoctoTizen/proto-meta-Tizen_ivi_3.0
+#
+# Copyright 2013, Intel Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# native
+'''
+Created on 05 fevr. 2013
+
+@author: ronan@fridu.net
+'''
+
+PROTODIR=$(spec2yocto working_dir)
+cd ${PROTODIR}
mkdir -p git_package
mkdir -p specfile-initial
@@ -15,28 +38,44 @@ getgit() {
cd ${gitName}
echo git fetch --all
git fetch --all
+ if [ $? == 0 ] ; then ERROR_FETCH_LIST=${ERROR_FETCH_LIST}${gitName}' ' ; fi
cd -
else
echo ${GIT_CLONE} $gitServer:$gitPath ${gitName}
${GIT_CLONE} $gitServer:$gitPath ${gitName}
+ if [ $? == 0 ] ; then ERROR_CLONE_LIST=${ERROR_CLONE_LIST}${gitName}' ' ; fi
fi
}
-
+if [ -z $1 ]; then
spec2yocto manifestToList > /tmp/manifestToList.txt
+else
+spec2yocto manifestToList | grep $1 > /tmp/manifestToList.txt
+fi
+
+
+
+TOTALPKG=$(cat /tmp/manifestToList.txt | wc -l)
+CURPKG=1
+
+ERROR_FETCH_LIST=
+ERROR_CLONE_LIST=
+ERROR_RESET_LIST=
+ERROR_COPYSPEC_LIST=
cat /tmp/manifestToList.txt |
while read gitName gitPath gitTag gitServer; do
CURDIR=`pwd`
- echo "--------------------------------------------------------------"
+ echo "--------------------------------------------------------------" ${CURPKG}/${TOTALPKG}
echo gitName ${gitName}
getgit $gitName $gitPath $gitTag $gitServer
cd $CURDIR/${gitName}
echo
echo git reset --hard "$gitTag"
git reset --hard "$gitTag"
+ if [ $? == 0 ] ; then ERROR_RESET_LIST=${ERROR_RESET_LIST}${gitName}' ' ; fi
cd "$CURDIR"
rm -fr ../specfile-initial/${gitName}/*
@@ -44,12 +83,36 @@ while read gitName gitPath gitTag gitServer; do
SPEC_FILE=$(spec2yocto findBestSpecFile ${gitName}/packaging --package_pn=${gitName})
cp ${SPEC_FILE} ../specfile-initial/${gitName}/packaging/
+ if [ $? == 0 ] ; then ERROR_COPYSPEC_LIST=${ERROR_COPYSPEC_LIST}${gitName}' ' ; fi
+ CURPKG=$(( ${CURPKG} +1 ))
done
rm /tmp/manifestToList.txt
cd ..
+echo ________________________________________________________________________________
+echo package git fetch error:
+for package_error in ${ERROR_FETCH_LIST}; do
+ echo ' '${package_error}
+done
+echo ________________________________________________________________________________
+echo package git clone error:
+for package_error in ${ERROR_CLONE_LIST}; do
+ echo ' '${package_error}
+done
+ echo ________________________________________________________________________________
+echo package git reset error:
+for package_error in ${ERROR_RESET_LIST}; do
+ echo ' '${package_error}
+done
+ echo ________________________________________________________________________________
+echo package copy spec file error:
+for package_error in ${ERROR_COPYSPEC_LIST}; do
+ echo ' '${package_error}
+done
+
+
diff --git a/tools/spec2yocto.py b/tools/spec2yocto.py
index b35796b86..02fd547b9 100755
--- a/tools/spec2yocto.py
+++ b/tools/spec2yocto.py
@@ -1,5 +1,4 @@
#!/usr/bin/python
-
#
# Copyright 2013, Intel Inc.
#
@@ -2155,10 +2154,14 @@ class manifestCollection:
list_arch = get_project_arch( xml_str )
arch = SPEC2YOCTO_CONFIG.get_project_arch( self.__my_project )
+
if ( arch == "i586" ) and ( "ia32" in list_arch ):
arch = "ia32"
elif ( arch is None ) and ( len( list_arch ) > 0 ):
arch = list_arch[0]
+ elif ( arch not in list_arch ):
+ arch = list_arch[0]
+
manifest_name = "%s_%s.xml" % ( project_id, arch )
meta_manifest_url_path = "%s/builddata/manifest/%s"
@@ -2699,6 +2702,32 @@ class spec2yoctoCommandline( cmdln.Cmdln ):
if res != 1:
print res
+ @cmdln.option( "--debug",
+ action = "store",
+ default = None,
+ help = "run the in debug mode.[yes/no]" )
+ @cmdln.option( "--project",
+ action = "store",
+ default = None,
+ help = "select the project." )
+ def do_working_dir( self, subcmd, opts ):
+ """${cmd_name}: return the proto directory.
+
+ ${cmd_usage}--
+ ${cmd_option_list}
+ """
+ check_debugmode( opts.debug )
+
+ if opts.project is None:
+ project = SPEC2YOCTO_CONFIG.get_current_project()
+ else:
+ project = opts.project
+
+ res = working_dir = SPEC2YOCTO_CONFIG.get_working_dir( project )
+ if res != 1:
+ print res
+
+
def main():
commandline = spec2yoctoCommandline()
@@ -2712,7 +2741,7 @@ def main():
# commandline.do_help([sys.argv[0]])
print
print >> sys.stderr, colorize( str( ioe ), "red" )
- if hasattr( ioe, "fakeobs_config_error" ):
+ if hasattr( ioe, "spec2yocto_config_error" ):
msg = "See '--config' option"
print >> sys.stderr, colorize( msg, "red" )
res = 1