diff options
| -rw-r--r-- | meta/recipes-devtools/git/git.inc | 2 | ||||
| -rwxr-xr-x | scripts/bitbake | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc index ce2f5742f1..6748b70d24 100644 --- a/meta/recipes-devtools/git/git.inc +++ b/meta/recipes-devtools/git/git.inc | |||
| @@ -3,6 +3,8 @@ SECTION = "console/utils" | |||
| 3 | LICENSE = "GPLv2" | 3 | LICENSE = "GPLv2" |
| 4 | DEPENDS = "openssl curl zlib expat" | 4 | DEPENDS = "openssl curl zlib expat" |
| 5 | 5 | ||
| 6 | PROVIDES_append_virtclass-native = " git-replacement-native" | ||
| 7 | |||
| 6 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.bz2 " | 8 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.bz2 " |
| 7 | S = "${WORKDIR}/git-${PV}" | 9 | S = "${WORKDIR}/git-${PV}" |
| 8 | 10 | ||
diff --git a/scripts/bitbake b/scripts/bitbake index 3772d826fe..580f377a61 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
| @@ -58,7 +58,9 @@ elif [ -z "$BUILDDIR" ] ; then | |||
| 58 | fi | 58 | fi |
| 59 | 59 | ||
| 60 | needtar="1" | 60 | needtar="1" |
| 61 | needgit="1" | ||
| 61 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` | 62 | TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` |
| 63 | GITVERSION=`git --version | cut -d ' ' -f 3` | ||
| 62 | float_test() { | 64 | float_test() { |
| 63 | echo | awk 'END { exit ( !( '"$1"')); }' | 65 | echo | awk 'END { exit ( !( '"$1"')); }' |
| 64 | } | 66 | } |
| @@ -67,6 +69,10 @@ float_test() { | |||
| 67 | # but earlier versions do not; this needs to work properly for sstate | 69 | # but earlier versions do not; this needs to work properly for sstate |
| 68 | float_test "$TARVERSION > 1.23" && needtar="0" | 70 | float_test "$TARVERSION > 1.23" && needtar="0" |
| 69 | 71 | ||
| 72 | # Need git >= 1.7.5 for git-remote --mirror=xxx syntax | ||
| 73 | float_test "$GITVERSION >= 1.7.5" && needgit="0" | ||
| 74 | |||
| 75 | |||
| 70 | buildpseudo="1" | 76 | buildpseudo="1" |
| 71 | if [ $needpseudo = "1" ]; then | 77 | if [ $needpseudo = "1" ]; then |
| 72 | if [ -e "$BUILDDIR/pseudodone" ]; then | 78 | if [ -e "$BUILDDIR/pseudodone" ]; then |
| @@ -97,6 +103,10 @@ fi | |||
| 97 | if [ -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then | 103 | if [ -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then |
| 98 | needtar="0" | 104 | needtar="0" |
| 99 | fi | 105 | fi |
| 106 | # If git is already built, we don't want to do it again... | ||
| 107 | if [ -e "$PSEUDOBINDIR/git" -a "$needgit" = "1" ]; then | ||
| 108 | needgit="0" | ||
| 109 | fi | ||
| 100 | 110 | ||
| 101 | if [ $needpseudo = "0" ]; then | 111 | if [ $needpseudo = "0" ]; then |
| 102 | buildpseudo="0" | 112 | buildpseudo="0" |
| @@ -123,6 +133,11 @@ if [ $buildpseudo -gt 0 ]; then | |||
| 123 | if [ $needtar = "0" ]; then | 133 | if [ $needtar = "0" ]; then |
| 124 | TARTARGET="" | 134 | TARTARGET="" |
| 125 | fi | 135 | fi |
| 136 | GITTARGET="git-replacement-native" | ||
| 137 | if [ $needgit = "0" ]; then | ||
| 138 | GITTARGET="" | ||
| 139 | fi | ||
| 140 | |||
| 126 | # Pass through debug options | 141 | # Pass through debug options |
| 127 | additionalopts="" | 142 | additionalopts="" |
| 128 | for opt in $@; do | 143 | for opt in $@; do |
| @@ -134,7 +149,7 @@ if [ $buildpseudo -gt 0 ]; then | |||
| 134 | fi | 149 | fi |
| 135 | done | 150 | done |
| 136 | done | 151 | done |
| 137 | bitbake pseudo-native $TARTARGET $additionalopts -c populate_sysroot | 152 | bitbake pseudo-native $TARTARGET $GITTARGET $additionalopts -c populate_sysroot |
| 138 | ret=$? | 153 | ret=$? |
| 139 | if [ "$ret" != "0" ]; then | 154 | if [ "$ret" != "0" ]; then |
| 140 | exit 1 | 155 | exit 1 |
