summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-08-21 14:17:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-23 11:43:33 +0100
commiteab2efc596c6d6d8bd785de4ce7bb6b23379c573 (patch)
tree388aee87ae1ac7cea75f3a4dce27437196f84eb6 /scripts/combo-layer
parent528d5e147891076abce6dd1013712572441fa3b7 (diff)
downloadpoky-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-xscripts/combo-layer5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 448fe71cd9..330faca389 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -191,7 +191,7 @@ def action_init(conf, args):
191 branch = repo.get('branch', "master") 191 branch = repo.get('branch', "master")
192 file_filter = repo.get('file_filter', "") 192 file_filter = repo.get('file_filter', "")
193 runcmd("git archive %s | tar -x -C %s %s" % (branch, extract_dir, file_filter), ldir) 193 runcmd("git archive %s | tar -x -C %s %s" % (branch, extract_dir, file_filter), ldir)
194 lastrev = runcmd("git rev-parse HEAD", ldir).strip() 194 lastrev = runcmd("git rev-parse %s" % branch, ldir).strip()
195 conf.update(name, "last_revision", lastrev, initmode=True) 195 conf.update(name, "last_revision", lastrev, initmode=True)
196 runcmd("git add .") 196 runcmd("git add .")
197 if conf.localconffile: 197 if conf.localconffile:
@@ -475,7 +475,8 @@ def apply_patchlist(conf, repos):
475 else: 475 else:
476 logger.info("No patches to apply from %s" % name) 476 logger.info("No patches to apply from %s" % name)
477 ldir = conf.repos[name]['local_repo_dir'] 477 ldir = conf.repos[name]['local_repo_dir']
478 lastrev = runcmd("git rev-parse HEAD", ldir).strip() 478 branch = conf.repos[name].get('branch', "master")
479 lastrev = runcmd("git rev-parse %s" % branch, ldir).strip()
479 480
480 if lastrev != repo['last_revision']: 481 if lastrev != repo['last_revision']:
481 conf.update(name, "last_revision", lastrev) 482 conf.update(name, "last_revision", lastrev)