Add option to allow building from local repo
cover Add option to allow building from local repo
From: Timo Mueller <[email protected]>
Hi,
if you build eclipse-poky with the provided build script it will always use the upstream version of the IDE.
During development I wanted to use my local repository to make sure that my changes don't break the build system. Therefor I added an option to the build script to allow building from the local eclipse-poky git repository.
Best regards,
Timo
Timo Mueller (3):
scripts/build.sh: Added function to use the local repository for
building
scripts/build.sh: Added help option to the cmdline script/build.sh: Added option to enable building from local
repository.
scripts/build.sh | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.7.6
PATCH 1/3 scripts/build.sh: Added function to use the local repository for building
From: Timo Mueller <[email protected]>
If USE_LOCAL_GIT_REPO is set to 1 the build scripts uses the local repository of the eclipse poky project for building instead of the upstream project. The local repository is derived from the location for the build script.
--- scripts/build.sh | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
scripts/build.sh +8 -0
@@ -65,6 +65,8 @@ check_env () fi } +USE_LOCAL_GIT_REPO=0 + if [ $# -ne 2 ] && [ $# -ne 3 ]; then help fi
@@ -97,6 +99,12 @@ mkdir ${BUILD_DIR} || fail $? "Create temporary build directory ${BUILD_DIR}" #git clone GIT_URL=git://git.pokylinux.org/eclipse-poky.git +if [ $USE_LOCAL_GIT_REPO -eq 1 ]; then + SCRIPT_DIR=`dirname $0` + GIT_DIR=`readlink -f ${SCRIPTDIR}\..` + GIT_URL="file://${GIT_DIR}" +fi + GIT_DIR=${BUILD_SRC} #mkdir ${GIT_DIR} #cp -r features/ ${GIT_DIR}
Signature · 1 line
1.7.7.6
PATCH 2/3 scripts/build.sh: Added help option to the cmdline
From: Timo Mueller <[email protected]>
Calling the build script with the -h option will now show the usage. The cmdline parsing can be extended to add new options in the future.
--- scripts/build.sh | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-)
scripts/build.sh +14 -4
@@ -3,12 +3,13 @@ help () { echo "Build the Yocto Eclipse plugins" - echo "Usage: $0 <branch name> <release name>"; + echo "Usage: $0 [OPTIONS] BRANCH_NAME RELEASE_NAME [TAG_NAME]"; echo "" echo "Options:" - echo "<branch name> - git branch name to build upon" - echo "<release name> - release name in the final output name" - echo "[tag name] - git tag name to build upon. defaults to master if not set" + echo "-h - display this help and exit" + echo "BRANCH_NAME - git branch name to build upon" + echo "RELEAES_NAME - release name in the final output name" + echo "TAG_NAME - git tag name to build upon. defaults to HEAD if not set" echo "" echo "Example: $0 master r0 M1.1_rc1"; exit 1;
@@ -66,6 +67,15 @@ check_env () } USE_LOCAL_GIT_REPO=0 +while getopts ":h" opt; do + case $opt in + h) + help + ;; + esac +done +shift $(($OPTIND - 1)) + if [ $# -ne 2 ] && [ $# -ne 3 ]; then help
Signature · 1 line
1.7.7.6
PATCH 3/3 script/build.sh: Added option to enable building from local repository.
From: Timo Mueller <[email protected]>
If the script is called with the -l option the local git repository is used instead of the upstream repository.
--- scripts/build.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
scripts/build.sh +5 -1
@@ -7,6 +7,7 @@ help () echo "" echo "Options:" echo "-h - display this help and exit" + echo "-l - use local git repository" echo "BRANCH_NAME - git branch name to build upon" echo "RELEAES_NAME - release name in the final output name" echo "TAG_NAME - git tag name to build upon. defaults to HEAD if not set"
@@ -67,11 +68,14 @@ check_env () } USE_LOCAL_GIT_REPO=0 -while getopts ":h" opt; do +while getopts ":lh" opt; do case $opt in h) help ;; + l) + USE_LOCAL_GIT_REPO=1 + ;; esac done shift $(($OPTIND - 1))
Signature · 1 line
1.7.7.6
Hi Timo,
There're some changes made to eclipse build scripts, so your patch won't be able to apply. Can you rebase against latest master and resend?
Thanks,
Jessica
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Friday, November 30, 2012 2:33 AM
To: [email protected]
Cc: Timo Mueller
Subject: [yocto] [PATCH 0/3][eclipse-poky] Add option to allow building from local repo
From: Timo Mueller <[email protected]>
Hi,
if you build eclipse-poky with the provided build script it will always use the upstream version of the IDE.
During development I wanted to use my local repository to make sure that my changes don't break the build system. Therefor I added an option to the build script to allow building from the local eclipse-poky git repository.
Best regards,
Timo
Timo Mueller (3):
scripts/build.sh: Added function to use the local repository for
building
scripts/build.sh: Added help option to the cmdline script/build.sh: Added option to enable building from local
repository.
scripts/build.sh | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-)
--
1.7.7.6
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto