diff options
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r-- | meta/lib/oe/patch.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 5990896fdc..ff9afc9df9 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py | |||
@@ -547,7 +547,10 @@ class GitApplyTree(PatchTree): | |||
547 | reporoot = (runcmd("git rev-parse --show-toplevel".split(), self.dir) or '').strip() | 547 | reporoot = (runcmd("git rev-parse --show-toplevel".split(), self.dir) or '').strip() |
548 | if not reporoot: | 548 | if not reporoot: |
549 | raise Exception("Cannot get repository root for directory %s" % self.dir) | 549 | raise Exception("Cannot get repository root for directory %s" % self.dir) |
550 | hooks_dir = os.path.join(reporoot, '.git', 'hooks') | 550 | gitdir = (runcmd("git rev-parse --absolute-git-dir".split(), self.dir) or '').strip() |
551 | if not gitdir: | ||
552 | raise Exception("Cannot get gitdir for directory %s" % self.dir) | ||
553 | hooks_dir = os.path.join(gitdir, 'hooks') | ||
551 | hooks_dir_backup = hooks_dir + '.devtool-orig' | 554 | hooks_dir_backup = hooks_dir + '.devtool-orig' |
552 | if os.path.lexists(hooks_dir_backup): | 555 | if os.path.lexists(hooks_dir_backup): |
553 | raise Exception("Git hooks backup directory already exists: %s" % hooks_dir_backup) | 556 | raise Exception("Git hooks backup directory already exists: %s" % hooks_dir_backup) |