Skip to contentSkip to conversation

Add option to allow building from local repo

PATCH Applied [email protected] 2 participants 5 messages Dec 11, 2012

lore
Share & tools
lore
#0 lore raw

v3 cover Add option to allow building from local repo

From: Timo Mueller <[email protected]>

Hi,

as Paul requested I've signed-off the patches. Other than that it's still the rebased patch series from PATCHv2.

Best regards,
Timo

From the original cover letter:
<snip>
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. </snip>

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
#1 lore raw

PATCH v3 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
index de81ce3..cbb7375 100755
@@ -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
#2 lore raw

PATCH v3 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
index cbb7375..693dcf7 100755
@@ -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
#3 lore raw

PATCH v3 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
index 693dcf7..54081d5 100755
@@ -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
#4 lore raw
In reply to [email protected]

Merged to eclipse-poky master.

Thanks,
Jessica

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Tuesday, December 11, 2012 12:13 AM
To: [email protected]
Cc: Timo Mueller
Subject: [yocto] [PATCHv3 0/3][eclipse-poky] Add option to allow building from local repo

From: Timo Mueller <[email protected]>

Hi,

as Paul requested I've signed-off the patches. Other than that it's still the rebased patch series from PATCHv2.

Best regards,
Timo

From the original cover letter:
<snip>
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. </snip>

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