diff options
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/kernel-yocto.bbclass | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 1b37dc781a..4328093778 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
| @@ -273,11 +273,15 @@ do_validate_branches() { | |||
| 273 | # SRCREV (if it isn't the current HEAD of that branch) | 273 | # SRCREV (if it isn't the current HEAD of that branch) |
| 274 | git checkout -q master | 274 | git checkout -q master |
| 275 | for b in $containing_branches; do | 275 | for b in $containing_branches; do |
| 276 | branch_head=`git show-ref -s --heads ${b}` | 276 | branch_head=`git show-ref -s --heads ${b}` |
| 277 | if [ "$branch_head" != "$target_branch_head" ]; then | 277 | if [ "$branch_head" != "$target_branch_head" ]; then |
| 278 | echo "[INFO] Setting branch $b to ${target_branch_head}" | 278 | echo "[INFO] Setting branch $b to ${target_branch_head}" |
| 279 | git branch -D $b > /dev/null | 279 | if [ "$b" == "master" ]; then |
| 280 | git branch $b $target_branch_head > /dev/null | 280 | git reset --hard $target_branch_head > /dev/null |
| 281 | else | ||
| 282 | git branch -D $b > /dev/null | ||
| 283 | git branch $b $target_branch_head > /dev/null | ||
| 284 | fi | ||
| 281 | fi | 285 | fi |
| 282 | done | 286 | done |
| 283 | 287 | ||
