summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-11-07 12:07:02 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-07 14:05:37 (GMT)
commitba5537d7687b1f735d8894f959c6c1a92c769a04 (patch)
treea3a3c212e5342043c9897e689e42d52fb82e679f /scripts/combo-layer
parentc04305e6958add5a8c21422185d32d29116ab3d6 (diff)
downloadpoky-ba5537d7687b1f735d8894f959c6c1a92c769a04.tar.gz
scripts/combo-layer: skip empty commits
If a commit is empty (for example, commits brought over from svn where only properties were changed) then attempting to apply it with "git am" will result in the error "Patch format detection failed", so skip it instead. (From OE-Core rev: 5754bc7bcc2f57b6b56e67e2900eeaab5bc184d8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-rwxr-xr-xscripts/combo-layer27
1 files changed, 15 insertions, 12 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 597d6cb..b4b1e48 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -252,18 +252,21 @@ def action_apply_patch(conf, args):
252 for line in open(repo['patchlist']): 252 for line in open(repo['patchlist']):
253 patchfile = line.split()[0] 253 patchfile = line.split()[0]
254 lastrev = line.split()[1] 254 lastrev = line.split()[1]
255 cmd = "git am --keep-cr -s -p1 %s" % patchfile 255 if os.path.getsize(patchfile) == 0:
256 logger.info("Apply %s" % patchfile ) 256 logger.info("(skipping %s - no changes)", lastrev)
257 try: 257 else:
258 runcmd(cmd) 258 cmd = "git am --keep-cr -s -p1 %s" % patchfile
259 except subprocess.CalledProcessError: 259 logger.info("Apply %s" % patchfile )
260 logger.info('running "git am --abort" to cleanup repo') 260 try:
261 runcmd("git am --abort") 261 runcmd(cmd)
262 logger.error('"%s" failed' % cmd) 262 except subprocess.CalledProcessError:
263 logger.info("please manually apply patch %s" % patchfile) 263 logger.info('running "git am --abort" to cleanup repo')
264 logger.info("After applying, run this tool again to apply the remaining patches") 264 runcmd("git am --abort")
265 conf.update(name, "last_revision", lastrev) 265 logger.error('"%s" failed' % cmd)
266 sys.exit(0) 266 logger.info("please manually apply patch %s" % patchfile)
267 logger.info("After applying, run this tool again to apply the remaining patches")
268 conf.update(name, "last_revision", lastrev)
269 sys.exit(0)
267 conf.update(name, "last_revision", lastrev) 270 conf.update(name, "last_revision", lastrev)
268 271
269def action_splitpatch(conf, args): 272def action_splitpatch(conf, args):