summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index f8969973..3c0d9e02 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -742,8 +742,13 @@ class SystemBuilder(BuilderBase): # pragma: no cover
mount_type)
mounted.append(path)
+ # The single - is just a shell convention to fill $0 when using -c,
+ # since ordinarily $0 contains the program name.
+ # -- is used to indicate the end of options for run-parts,
+ # we don't want SYSTEM_INTEGRATION_PATH to be interpreted
+ # as an option if it happens to begin with a -
self.app.runcmd(['chroot', rootdir, 'sh', '-c',
- 'cd / && run-parts "$1"', '-', SYSTEM_INTEGRATION_PATH],
+ 'cd / && run-parts -- "$1"', '-', SYSTEM_INTEGRATION_PATH],
env=env)
except BaseException, e:
self.app.status(