mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
kernel-yocto: set master branch to a defined SRCREV
To support custom repositories that set a SRCREV and that only have a single master branch, do_validate_branches needs a special case for 'master'. We can't delete and recreate the branch, since you cannot delete the current branch, instead we must reset the branch to the proper SRCREV. (From OE-Core rev: de5bb5879fa3282c46dc1ede36af34eaab8f647f) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
9a1705ef80
commit
01ce721684
@@ -273,11 +273,15 @@ do_validate_branches() {
|
|||||||
# SRCREV (if it isn't the current HEAD of that branch)
|
# SRCREV (if it isn't the current HEAD of that branch)
|
||||||
git checkout -q master
|
git checkout -q master
|
||||||
for b in $containing_branches; do
|
for b in $containing_branches; do
|
||||||
branch_head=`git show-ref -s --heads ${b}`
|
branch_head=`git show-ref -s --heads ${b}`
|
||||||
if [ "$branch_head" != "$target_branch_head" ]; then
|
if [ "$branch_head" != "$target_branch_head" ]; then
|
||||||
echo "[INFO] Setting branch $b to ${target_branch_head}"
|
echo "[INFO] Setting branch $b to ${target_branch_head}"
|
||||||
git branch -D $b > /dev/null
|
if [ "$b" == "master" ]; then
|
||||||
git branch $b $target_branch_head > /dev/null
|
git reset --hard $target_branch_head > /dev/null
|
||||||
|
else
|
||||||
|
git branch -D $b > /dev/null
|
||||||
|
git branch $b $target_branch_head > /dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70c
|
|||||||
|
|
||||||
DEPENDS = "git-native guilt-native"
|
DEPENDS = "git-native guilt-native"
|
||||||
|
|
||||||
SRCREV = "33068f21169b327c64ac7e957fe9d89c391897a3"
|
SRCREV = "7d936da57db11f1114f3860e4fcc15221e796275"
|
||||||
PR = "r12"
|
PR = "r12"
|
||||||
PV = "0.1+git${SRCPV}"
|
PV = "0.1+git${SRCPV}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user