summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index f2e2ca8a2b..944ec5f455 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -28,6 +28,7 @@
28import logging 28import logging
29import os 29import os
30import shutil 30import shutil
31import sys
31 32
32from oe.path import copyhardlinktree 33from oe.path import copyhardlinktree
33 34
@@ -98,7 +99,8 @@ class RootfsPlugin(SourcePlugin):
98 for orig_path in part.exclude_path: 99 for orig_path in part.exclude_path:
99 path = orig_path 100 path = orig_path
100 if os.path.isabs(path): 101 if os.path.isabs(path):
101 msger.error("Must be relative: --exclude-path=%s" % orig_path) 102 logger.error("Must be relative: --exclude-path=%s" % orig_path)
103 sys.exit(1)
102 104
103 full_path = os.path.realpath(os.path.join(new_rootfs, path)) 105 full_path = os.path.realpath(os.path.join(new_rootfs, path))
104 106
@@ -106,7 +108,8 @@ class RootfsPlugin(SourcePlugin):
106 # because doing so could be quite disastrous (we will delete the 108 # because doing so could be quite disastrous (we will delete the
107 # directory). 109 # directory).
108 if not full_path.startswith(new_rootfs): 110 if not full_path.startswith(new_rootfs):
109 msger.error("'%s' points to a path outside the rootfs" % orig_path) 111 logger.error("'%s' points to a path outside the rootfs" % orig_path)
112 sys.exit(1)
110 113
111 if path.endswith(os.sep): 114 if path.endswith(os.sep):
112 # Delete content only. 115 # Delete content only.