# find the master/machine source branch. In the same way that the fetcher proceses
# git repositories in the SRC_URI we take the first repo found, first branch.
-def get_machine_branch(d):
+def get_machine_branch(d, default):
fetch = bb.fetch2.Fetch([], d)
for url in fetch.urls:
urldata = fetch.ud[url]
branches = urldata.parm.get("branch").split(',')
return branches[0]
- return "master"
+ return default
do_patch() {
cd ${S}
fi
fi
- machine_branch="${@ get_machine_branch(d)}"
+ machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
# if we have a defined/set meta branch we should not be generating
# any meta data. The passed branch has what we need.
fi
fi
- machine_branch="${@ get_machine_branch(d)}"
+ machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+
if [ "${KBRANCH}" != "${machine_branch}" ]; then
echo "WARNING: The SRC_URI machine branch and KBRANCH are not the same."
echo " KBRANCH will be adjusted to match, but this typically is a"
cd ${S}
export KMETA=${KMETA}
- machine_branch="${@ get_machine_branch(d)}"
+ machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
set +e
# if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to