summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 9768be077f..75fb91e0fb 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -311,7 +311,7 @@ class QuiltTree(PatchSet):
311 self._runcmd(args) 311 self._runcmd(args)
312 312
313class Resolver(object): 313class Resolver(object):
314 def __init__(self, patchset): 314 def __init__(self, patchset, terminal):
315 raise NotImplementedError() 315 raise NotImplementedError()
316 316
317 def Resolve(self): 317 def Resolve(self):
@@ -324,8 +324,9 @@ class Resolver(object):
324 raise NotImplementedError() 324 raise NotImplementedError()
325 325
326class NOOPResolver(Resolver): 326class NOOPResolver(Resolver):
327 def __init__(self, patchset): 327 def __init__(self, patchset, terminal):
328 self.patchset = patchset 328 self.patchset = patchset
329 self.terminal = terminal
329 330
330 def Resolve(self): 331 def Resolve(self):
331 olddir = os.path.abspath(os.curdir) 332 olddir = os.path.abspath(os.curdir)
@@ -341,13 +342,13 @@ class NOOPResolver(Resolver):
341# resolution, with the exception of refreshing the remote copy of the patch 342# resolution, with the exception of refreshing the remote copy of the patch
342# files (the urls). 343# files (the urls).
343class UserResolver(Resolver): 344class UserResolver(Resolver):
344 def __init__(self, patchset): 345 def __init__(self, patchset, terminal):
345 self.patchset = patchset 346 self.patchset = patchset
347 self.terminal = terminal
346 348
347 # Force a push in the patchset, then drop to a shell for the user to 349 # Force a push in the patchset, then drop to a shell for the user to
348 # resolve any rejected hunks 350 # resolve any rejected hunks
349 def Resolve(self): 351 def Resolve(self):
350
351 olddir = os.path.abspath(os.curdir) 352 olddir = os.path.abspath(os.curdir)
352 os.chdir(self.patchset.dir) 353 os.chdir(self.patchset.dir)
353 try: 354 try:
@@ -368,16 +369,10 @@ class UserResolver(Resolver):
368 f.write("echo 'Run \"quilt refresh\" when patch is corrected, press CTRL+D to exit.'\n") 369 f.write("echo 'Run \"quilt refresh\" when patch is corrected, press CTRL+D to exit.'\n")
369 f.write("echo ''\n") 370 f.write("echo ''\n")
370 f.write(" ".join(patchcmd) + "\n") 371 f.write(" ".join(patchcmd) + "\n")
371 f.write("#" + bb.data.getVar('TERMCMDRUN', self.patchset.d, 1))
372 f.close() 372 f.close()
373 os.chmod(rcfile, 0775) 373 os.chmod(rcfile, 0775)
374 374
375 os.environ['TERMWINDOWTITLE'] = "Bitbake: Please fix patch rejects manually" 375 self.terminal("bash --rcfile " + rcfile, 'Patch Rejects: Please fix patch rejects manually', self.patchset.d)
376 os.environ['SHELLCMDS'] = "bash --rcfile " + rcfile
377 rc = os.system(bb.data.getVar('TERMCMDRUN', self.patchset.d, 1))
378 if os.WIFEXITED(rc) and os.WEXITSTATUS(rc) != 0:
379 bb.msg.fatal("Build", ("Cannot proceed with manual patch resolution - '%s' not found. " \
380 + "Check TERMCMDRUN variable.") % bb.data.getVar('TERMCMDRUN', self.patchset.d, 1))
381 376
382 # Construct a new PatchSet after the user's changes, compare the 377 # Construct a new PatchSet after the user's changes, compare the
383 # sets, checking patches for modifications, and doing a remote 378 # sets, checking patches for modifications, and doing a remote