Skip to content

Commit c992342

Browse files
author
Marc-André Moreau
committed
try patching differently
1 parent b8a48e9 commit c992342

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

recipes/openssh/conanfile.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ def source(self):
3939
git.clone(self.url)
4040
git.checkout(self.branch)
4141

42-
git = tools.Git(folder="openssh-distro")
43-
git.clone("https://github.com/Devolutions/openssh-distro")
44-
git.checkout('openssh-update')
42+
git_distro = tools.Git(folder="openssh-distro")
43+
git_distro.clone("https://github.com/Devolutions/openssh-distro")
44+
git_distro.checkout('openssh-update')
4545
version_dir = 'v%s' % (self.version)
46-
patches_dir = os.path.join("openssh-distro", "patches", version_dir)
46+
patches_dir = os.path.join(os.getcwd(), "openssh-distro", "patches", version_dir)
4747
if os.path.isdir(patches_dir):
48-
for patch_file in sorted([f for f in os.listdir(patches_dir) if f.endswith('.patch')]):
48+
patch_files = sorted([f for f in os.listdir(patches_dir) if f.endswith('.patch')])
49+
for patch_file in patch_files:
4950
patch_path = os.path.join(patches_dir, patch_file)
50-
tools.patch(base_path=folder, patch_file=patch_path)
51+
git_cmd = 'am --whitespace=nowarn %s' % (patch_path)
52+
git.run(git_cmd)
5153

5254
def build(self):
5355
cmake = CMake(self)

0 commit comments

Comments
 (0)