diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-08-21 14:17:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-23 11:43:33 +0100 |
commit | eab2efc596c6d6d8bd785de4ce7bb6b23379c573 (patch) | |
tree | 388aee87ae1ac7cea75f3a4dce27437196f84eb6 /scripts/combo-layer | |
parent | 528d5e147891076abce6dd1013712572441fa3b7 (diff) | |
download | ast2050-yocto-poky-eab2efc596c6d6d8bd785de4ce7bb6b23379c573.zip ast2050-yocto-poky-eab2efc596c6d6d8bd785de4ce7bb6b23379c573.tar.gz |
scripts/combo-layer: specify branch when getting current revision
Handle the case during update where the configured branch is not
currently checked out in the component repository by just specifying
it in the places where it was not previously.
(From OE-Core rev: a3ddf39af7e7cd47156677d8ae753964ee582745)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-rwxr-xr-x | scripts/combo-layer | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer index 448fe71..330faca 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -191,7 +191,7 @@ def action_init(conf, args): branch = repo.get('branch', "master") file_filter = repo.get('file_filter', "") runcmd("git archive %s | tar -x -C %s %s" % (branch, extract_dir, file_filter), ldir) - lastrev = runcmd("git rev-parse HEAD", ldir).strip() + lastrev = runcmd("git rev-parse %s" % branch, ldir).strip() conf.update(name, "last_revision", lastrev, initmode=True) runcmd("git add .") if conf.localconffile: @@ -475,7 +475,8 @@ def apply_patchlist(conf, repos): else: logger.info("No patches to apply from %s" % name) ldir = conf.repos[name]['local_repo_dir'] - lastrev = runcmd("git rev-parse HEAD", ldir).strip() + branch = conf.repos[name].get('branch', "master") + lastrev = runcmd("git rev-parse %s" % branch, ldir).strip() if lastrev != repo['last_revision']: conf.update(name, "last_revision", lastrev) |