diff options
author | Sergio Ahumada <sahumada@blackberry.com> | 2014-05-13 16:35:25 +0200 |
---|---|---|
committer | Sergio Ahumada <sahumada@blackberry.com> | 2014-05-14 16:12:44 +0200 |
commit | 44c62fbe818dcb47d61c84effb3ebd14df12a0c2 (patch) | |
tree | ce1ba577145b25c10e57a017c8b04dcc1c1fb054 /packaging-tools/mkqt5bld.py | |
parent | 31a3ab534ede421f8552b8db90a6cf8e7506841d (diff) |
QNX: Make patch_qnx_files() more generic
you can now pass the string to be replaced as a parameter.
by default it replaces the given regex with ''.
Change-Id: Iaa16b716d9f0792a2eed7e883a110d4c3442d777
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Diffstat (limited to 'packaging-tools/mkqt5bld.py')
-rw-r--r-- | packaging-tools/mkqt5bld.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packaging-tools/mkqt5bld.py b/packaging-tools/mkqt5bld.py index 32304d79b..c85bbf3ee 100644 --- a/packaging-tools/mkqt5bld.py +++ b/packaging-tools/mkqt5bld.py @@ -778,7 +778,7 @@ def patch_android_prl_files(): ############################### # function ############################### -def patch_qnx6_files(dir_tofind, regex_filename, line_toreplace, regex_toreplace): +def patch_qnx6_files(dir_tofind, regex_filename, line_toreplace, regex_toreplace, replace_with=''): # remove references to absolute path of the SDP on the build machine if QNX_BUILD: install_path_final = MAKE_INSTALL_ROOT_DIR + os.sep + SINGLE_INSTALL_DIR_NAME @@ -799,7 +799,7 @@ def patch_qnx6_files(dir_tofind, regex_filename, line_toreplace, regex_toreplace name_path = os.path.join(path_final, name_to_patch) for line in fileinput.FileInput(name_path, inplace=1): if line.startswith(line_toreplace): - line = regex.sub('', line) + line = regex.sub(replace_with, line) print line, |