diff --git a/octane/tests/test_patch_puppet.py b/octane/tests/test_patch_puppet.py index b88134b3..84a22eba 100644 --- a/octane/tests/test_patch_puppet.py +++ b/octane/tests/test_patch_puppet.py @@ -36,9 +36,9 @@ class MockFile(mock.MagicMock): def assert_calls(self): kwargs = {'stdin': self, 'cwd': magic_consts.PUPPET_DIR} - args = [((["patch", "-R", "-p3"], ), kwargs), ] + args = [((["patch", "-R", "-p1"], ), kwargs), ] if not self.revert: - args.append(((["patch", "-N", "-p3"], ), kwargs)) + args.append(((["patch", "-N", "-p1"], ), kwargs)) assert args == self.call_args diff --git a/octane/util/patch.py b/octane/util/patch.py index 6614e9b7..2b5a1559 100644 --- a/octane/util/patch.py +++ b/octane/util/patch.py @@ -17,7 +17,7 @@ def patch_apply(cwd, patches, revert=False): for path in patches: with open(path, 'rb') as patch: try: - subprocess.call(["patch", "-R", "-p3"], stdin=patch, cwd=cwd) + subprocess.call(["patch", "-R", "-p1"], stdin=patch, cwd=cwd) except subprocess.CalledProcessError: if not revert: pass @@ -25,4 +25,4 @@ def patch_apply(cwd, patches, revert=False): raise if not revert: patch.seek(0) - subprocess.call(["patch", "-N", "-p3"], stdin=patch, cwd=cwd) + subprocess.call(["patch", "-N", "-p1"], stdin=patch, cwd=cwd)