diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-08-11 11:03:40 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-05 00:31:23 +0100 |
commit | 42561c3a6580f694429593f409464564d3011d0d (patch) | |
tree | 88fb8f8826aaeccdb8386ae9182aa53609f16c81 /layerindex/recipeparse.py | |
parent | 91a0bbea06114265c99b31eb2d486f294581ec14 (diff) | |
download | openembedded-core-contrib-42561c3a6580f694429593f409464564d3011d0d.tar.gz |
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>
Diffstat (limited to 'layerindex/recipeparse.py')
-rw-r--r-- | layerindex/recipeparse.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py index 5eb7012e4e..12a6193a33 100644 --- a/layerindex/recipeparse.py +++ b/layerindex/recipeparse.py @@ -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 |