mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Allow SHA1 hash for bitbake branch
Allow the bitbake branch to be a SHA1 hash as well as a branch/tag. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
91a0bbea06
commit
42561c3a65
|
@ -46,7 +46,13 @@ def _parse_layer_conf(layerdir, data):
|
|||
def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout=False, classic=False, logger=None):
|
||||
if not (nocheckout or classic):
|
||||
# Check out the branch of BitBake appropriate for this branch and clean out any stale files (e.g. *.pyc)
|
||||
out = utils.runcmd("git checkout origin/%s" % branch.bitbake_branch, bitbakepath, logger=logger)
|
||||
if re.match('[0-9a-f]{40}', branch.bitbake_branch):
|
||||
# SHA1 hash
|
||||
bitbake_ref = branch.bitbake_branch
|
||||
else:
|
||||
# Branch name
|
||||
bitbake_ref = 'origin/%s' % branch.bitbake_branch
|
||||
out = utils.runcmd("git checkout %s" % bitbake_ref, bitbakepath, logger=logger)
|
||||
out = utils.runcmd("git clean -f -x", bitbakepath, logger=logger)
|
||||
|
||||
# Skip sanity checks
|
||||
|
|
Loading…
Reference in New Issue
Block a user