From 27be16e6365b3fa38db94c2bbdcd80fa9cfdc3b7 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 7 Mar 2013 10:50:40 -0500 Subject: Don't check exit codes when patching. Similar to what we did in 427769c we need to ignore checking exit codes for patch -N command so that they can be run multiple times. The motivation here is that I would like to use this to patch virtual env's created by tox. Tox doesn't provide a good hook to call post_process (which patches files) only once so the idea here is we'll just let it call post_process all the time... Change-Id: I866e7a3e1fd492d7d4c08eb55cde02f2dfa16c9a --- tools/install_venv_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 393214e..fca2512 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -185,7 +185,8 @@ class Fedora(Distro): self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs) def apply_patch(self, originalfile, patchfile): - self.run_command(['patch', '-N', originalfile, patchfile]) + self.run_command(['patch', '-N', originalfile, patchfile], + check_exit_code=False) def install_virtualenv(self): if self.check_cmd('virtualenv'): -- cgit