This is an automated email from the git hooks/post-receive script.
robert.savoye pushed a commit to branch parser in repository toolchain/abe.
The following commit(s) were added to refs/heads/parser by this push: new 5014b27 get_source() is now no longer used anywhere. 5014b27 is described below
commit 5014b27cf3d04b4979fb777ff40ce21e19b75234 Author: Rob Savoye rob.savoye@linaro.org Date: Thu Aug 20 13:01:03 2015 -0600
get_source() is now no longer used anywhere.
Change-Id: I41dc6f677d00cbfdc4e4803816014167675a1db4 --- abe.sh | 8 +--- lib/common.sh | 152 ---------------------------------------------------------- 2 files changed, 1 insertion(+), 159 deletions(-)
diff --git a/abe.sh b/abe.sh index 3a5d494..a2887aa 100755 --- a/abe.sh +++ b/abe.sh @@ -1260,13 +1260,7 @@ fi
if test ! -z ${do_checkout}; then if test x"${do_checkout}" != x"all"; then - url="`get_source ${do_checkout}`" - if test $? -gt 0; then - error "Couldn't find the source for ${do_checkout}" - build_failure - fi - - checkout ${url} + checkout ${do_checkout} if test $? -gt 0; then error "--checkout ${url} failed." build_failure diff --git a/lib/common.sh b/lib/common.sh index 67be001..1f8c549 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -433,158 +433,6 @@ find_snapshot() return 0 }
-# Get the full path or URL to checkout or download sources of a toolchain -# component. -# This is the kitchen sink of function. -# -# $1 - -# binutils, gcc, glibc, newlib, etc... -# -# returns ${url} as a string with either a single string that is the tarball -# name, or a URL that can be used by git. The fields are as returned by -# get_URL(), which is 'git url' and optionally 'git branch' 'git revision'. -get_source() -{ -# trace "$*" - - if test x"$1" = x; then - error "get_source() called without an argument!" - return 1 - fi - - local url= - # If a full URL or git repo identifier isn't passed as an argument, - # assume we want a tarball snapshot - if test `echo $1 | egrep -c "^svn|^git|^http|^ssh|^bzr|^lp|.git"` -eq 0; then - local snapshot - snapshot=`find_snapshot $1` - if test $? -gt 0; then - if test x"${interactive}" = x"yes"; then - # TODO: Add a testcase for this leg, conditional on - # interactive. - echo "Pick a unique snapshot name from this list: " 1>&2 - for i in ${snapshot}; do - echo " $i" 1>&2 - done - read answer - local url - url="`find_snapshot ${answer}`" - local ssret=$? - echo "${url}" - return ${ssret} - else - if test x"${snapshot}" != x; then - # It's possible that the value passed in to get_sources - # didn't match any known snapshots OR there were too many - # matches. Check <package>.conf:latest to see if there's a - # matching snapshot. - if test x"${latest}" != x; then - local url - url=`find_snapshot ${latest}` - local ssret=$? - echo "${url}" - return ${ssret} - fi - # Technically 'notice' and 'get_URL' already suppress without - # verbose being set but no reason to do unnecessary work. - if test "${verbose}" -gt 0; then - notice "Pick a unique snapshot name from this list and try again: " - for i in ${snapshot}; do - echo " $i" 1>&2 - done - list_URL $1 - fi - return 1 - fi - fi - else - echo ${snapshot} - return 0 - fi - else - # This leg captures direct urls that don't start or end in .git. - # This include svn directories and git identifiers that start with http://. - if test `echo $1 | egrep -c ".git"` -eq 0 -a `echo $1 | egrep -c "^git"` -eq 0; then - #if test `echo $1 | egrep -c ".git"` -eq 0; then - local url=$1 - echo "${url}" - return 0 - fi - fi - - # If a full URL isn't passed as an argment, get one for the - # toolchain component from the sources.conf file. - # If passed a full URL, use that to checkout the sources - if test x"${url}" = x; then - - local service= - service="`get_git_service $1`" - - # This might be a full URL or just an identifier. Use the - # service field to determine this. - local gitinfo= - if test x"${service}" = x; then - # Just an identifier, so get the full git info. - local gitinfo="`get_URL $1`" - if test x"${gitinfo}" = x; then - error "$1 not a valid sources.conf identifier." - return 1; - fi - else - # Full URL - local gitinfo="$1" - fi - - local url= - local url_ret= - url="`get_git_url ${gitinfo}`" - url_ret=$? - local branch= - branch="`get_git_branch ${gitinfo}`" - local revision= - revision="`get_git_revision ${gitinfo}`" - -# -# local url="`echo ${gitinfo} | cut -d ' ' -f 1`" -# if test `echo ${gitinfo} | wc -w` -gt 1; then -# local branch="`echo ${gitinfo} | cut -d ' ' -f 2`" -# else -# branch= -# fi -# if test `echo ${gitinfo} | wc -w` -gt 2; then -# local revision="`echo ${gitinfo} | cut -d ' ' -f 3`" -# fi - - #if test $? -gt 0; then - if test ${url_ret} -gt 0; then - if test x"${interactive}" = x"yes"; then - notice "Pick a unique URL (by identifier) from this list: " - list_URL $3 - for i in ${url}; do - echo "\t$i" 1>&2 - done - read answer - local url="`get_URL ${answer}`" - fi - # else - # notice "Pick a unique URL from this list: " - # for i in ${url}; do - # echo " $i" 1>&2 - # done - fi - fi - - # We aren't guaranteed a match even after snapshots and sources.conf have - # been checked. - if test x"${url}" = x; then - return 1 - fi - - echo "${url}${branch:+~${branch}}${revision:+@${revision}}" - - return 0 -} - # Get the proper source directory # $1 - The component name, which is one of the following: #