]> git.openpandora.org Git - openembedded.git/commitdiff
devshell.bbclass, patch.bbclass: Check exit code of TERMCMD* commands to see if they...
authorPaul Sokolovsky <pmiscml@gmail.com>
Fri, 11 May 2007 11:43:28 +0000 (11:43 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Fri, 11 May 2007 11:43:28 +0000 (11:43 +0000)
* Fixes #2274.

classes/devshell.bbclass
classes/patch.bbclass

index 06152ef8bcba2b304be5b3f4e4b82d51f40af961..09ce100fc44a96908ec4c81eb6879a02ab6d3c88 100644 (file)
@@ -6,6 +6,10 @@ do_devshell[nostamp] = "1"
 devshell_do_devshell() {
        export TERMWINDOWTITLE="Bitbake Developer Shell"
        ${TERMCMD}
+       if [ $? -eq 127 ]; then
+           echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
+           exit 1
+       fi
 }
 addtask devshell after do_patch
 
index 84cca7f5a0cefc809d9d134061bff612b6805a44..7a5dcac57ae2a21164873b3202a8b9591b690786 100644 (file)
@@ -376,7 +376,10 @@ def patch_init(d):
  
                                os.environ['TERMWINDOWTITLE'] = "Bitbake: Please fix patch rejects manually"
                                os.environ['TERMRCFILE'] = rcfile
-                               os.system(bb.data.getVar('TERMCMDRUN', d, 1))
+                               rc = os.system(bb.data.getVar('TERMCMDRUN', d, 1))
+                               if os.WIFEXITED(rc) and os.WEXITSTATUS(rc) == 127:
+                                       bb.msg.fatal(bb.msg.domain.Build, ("Cannot proceed with manual patch resolution - '%s' not found. " \
+                                           + "Check TERMCMDRUN variable.") % bb.data.getVar('TERMCMDRUN', d, 1))
 
                                # Construct a new PatchSet after the user's changes, compare the
                                # sets, checking patches for modifications, and doing a remote