diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2010-08-19 16:37:03 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 16:36:26 +0100 |
commit | e7e01e7831faf2d20fae13f356f58368c0ec99c8 (patch) | |
tree | dc204a4fc9bc669a52e19cafe90e78aab360b073 | |
parent | a33579dc71a5d1411b941b45f4b2abdc75c9aa84 (diff) | |
download | poky-e7e01e7831faf2d20fae13f356f58368c0ec99c8.tar.gz |
linux-wrs: allow packed refs to be present
The code which creates a working tree from the source
Wind River Linux git repository manipulates the refs
to make non-tracking, local branches. packed-refs remove
the files from refs, making this code break and the builds
fail.
To fix this, if we detect the packed refs we simply create
the local refs from the remote branches.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | meta/packages/linux/linux-wrs_git.bb | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/packages/linux/linux-wrs_git.bb b/meta/packages/linux/linux-wrs_git.bb index c8d362571f..eaa8e4447d 100644 --- a/meta/packages/linux/linux-wrs_git.bb +++ b/meta/packages/linux/linux-wrs_git.bb | |||
@@ -65,8 +65,23 @@ do_wrlinux_checkout() { | |||
65 | rm -rf ${S} | 65 | rm -rf ${S} |
66 | mkdir ${S} | 66 | mkdir ${S} |
67 | mv ${WORKDIR}/.git ${S} | 67 | mv ${WORKDIR}/.git ${S} |
68 | mv ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads | 68 | |
69 | rmdir ${S}/.git/refs/remotes/origin | 69 | if [ -e ${S}/.git/packed-refs ]; then |
70 | cd ${S} | ||
71 | rm -f .git/refs/remotes/origin/HEAD | ||
72 | IFS=' | ||
73 | '; | ||
74 | |||
75 | for r in `git show-ref | grep remotes`; do | ||
76 | ref=`echo $r | cut -d' ' -f1`; | ||
77 | b=`echo $r | cut -d'/' -f4`; | ||
78 | echo $ref > .git/refs/heads/$b | ||
79 | done | ||
80 | cd .. | ||
81 | else | ||
82 | mv ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads | ||
83 | rmdir ${S}/.git/refs/remotes/origin | ||
84 | fi | ||
70 | fi | 85 | fi |
71 | cd ${S} | 86 | cd ${S} |
72 | git checkout -f ${WRMACHINE}-${LINUX_KERNEL_TYPE} | 87 | git checkout -f ${WRMACHINE}-${LINUX_KERNEL_TYPE} |