Commit 7994dcc8 authored by Antoine Catton's avatar Antoine Catton

Buxfix: the patch wasn't send in stdin

parent ee8f3249
...@@ -89,6 +89,13 @@ def calls(call_string, **kwargs): ...@@ -89,6 +89,13 @@ def calls(call_string, **kwargs):
"""Subprocesser caller which allows to pass arguments as string""" """Subprocesser caller which allows to pass arguments as string"""
call(shlex.split(call_string), **kwargs) call(shlex.split(call_string), **kwargs)
def calli(*args, **kwargs):
"""Subprocesser call wich allow to pass stdin argument"""
popen = subprocess.Popen(*args, **kwargs)
popen.communicate()
if popen.returncode != 0:
raise subprocess.CalledProcessError(popen.returncode, ' '.join(args[0]))
def guessworkdir(path): def guessworkdir(path):
if len(os.listdir(path)) == 1: if len(os.listdir(path)) == 1:
...@@ -352,7 +359,7 @@ class Script: ...@@ -352,7 +359,7 @@ class Script:
patch_options = patch_options.split(' ') patch_options = patch_options.split(' ')
kwargs['stdin'] = open(self.download(patch, md5sum)) kwargs['stdin'] = open(self.download(patch, md5sum))
self.logger.info('Applying patch %r' % patch) self.logger.info('Applying patch %r' % patch)
call([patch_binary] + patch_options, **kwargs) calli([patch_binary] + patch_options, **kwargs)
class Cmmi(Script): class Cmmi(Script):
"""Simple configure-make-make-install compatible with hexagonit.recipe.cmmi """Simple configure-make-make-install compatible with hexagonit.recipe.cmmi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment