diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/combo-layer | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer index 7f2020fca7..2312cef9ac 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer | |||
| @@ -19,7 +19,7 @@ import tempfile | |||
| 19 | import configparser | 19 | import configparser |
| 20 | import re | 20 | import re |
| 21 | import copy | 21 | import copy |
| 22 | import pipes | 22 | import shlex |
| 23 | import shutil | 23 | import shutil |
| 24 | from string import Template | 24 | from string import Template |
| 25 | from functools import reduce | 25 | from functools import reduce |
| @@ -1275,7 +1275,7 @@ def apply_commit(parent, rev, largs, wargs, dest_dir, file_filter=None): | |||
| 1275 | target = os.path.join(wargs["destdir"], dest_dir) | 1275 | target = os.path.join(wargs["destdir"], dest_dir) |
| 1276 | if not os.path.isdir(target): | 1276 | if not os.path.isdir(target): |
| 1277 | os.makedirs(target) | 1277 | os.makedirs(target) |
| 1278 | quoted_target = pipes.quote(target) | 1278 | quoted_target = shlex.quote(target) |
| 1279 | # os.sysconf('SC_ARG_MAX') is lying: running a command with | 1279 | # os.sysconf('SC_ARG_MAX') is lying: running a command with |
| 1280 | # string length 629343 already failed with "Argument list too | 1280 | # string length 629343 already failed with "Argument list too |
| 1281 | # long" although SC_ARG_MAX = 2097152. "man execve" explains | 1281 | # long" although SC_ARG_MAX = 2097152. "man execve" explains |
| @@ -1287,7 +1287,7 @@ def apply_commit(parent, rev, largs, wargs, dest_dir, file_filter=None): | |||
| 1287 | unquoted_args = [] | 1287 | unquoted_args = [] |
| 1288 | cmdsize = 100 + len(quoted_target) | 1288 | cmdsize = 100 + len(quoted_target) |
| 1289 | while update: | 1289 | while update: |
| 1290 | quoted_next = pipes.quote(update[0]) | 1290 | quoted_next = shlex.quote(update[0]) |
| 1291 | size_next = len(quoted_next) + len(dest_dir) + 1 | 1291 | size_next = len(quoted_next) + len(dest_dir) + 1 |
| 1292 | logger.debug('cmdline length %d + %d < %d?' % (cmdsize, size_next, os.sysconf('SC_ARG_MAX'))) | 1292 | logger.debug('cmdline length %d + %d < %d?' % (cmdsize, size_next, os.sysconf('SC_ARG_MAX'))) |
| 1293 | if cmdsize + size_next < max_cmdsize: | 1293 | if cmdsize + size_next < max_cmdsize: |
