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.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 950fe723dc..9034fcae03 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -304,14 +304,19 @@ class GitApplyTree(PatchTree):
def _isInitialized(self):
cmd = "git rev-parse --show-toplevel"
- (status, output) = subprocess.getstatusoutput(cmd.split())
+ try:
+ output = runcmd(cmd.split(), self.dir).strip()
+ except CmdError as err:
+ ## runcmd returned non-zero which most likely means 128
+ ## Not a git directory
+ return False
## Make sure repo is in builddir to not break top-level git repos
- return status == 0 and os.path.samedir(output, self.dir)
+ return os.path.samefile(output, self.dir)
def _initRepo(self):
runcmd("git init".split(), self.dir)
runcmd("git add .".split(), self.dir)
- runcmd("git commit -a --allow-empty -m Patching_started".split(), self.dir)
+ runcmd("git commit -a --allow-empty -m bitbake_patching_started".split(), self.dir)
@staticmethod
def extractPatchHeader(patchfile):