diff options
Diffstat (limited to 'scripts/lib/wic/pluginbase.py')
| -rw-r--r-- | scripts/lib/wic/pluginbase.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py index f74d6430fd..d9b4e57747 100644 --- a/scripts/lib/wic/pluginbase.py +++ b/scripts/lib/wic/pluginbase.py | |||
| @@ -18,7 +18,7 @@ from wic.misc import get_bitbake_var | |||
| 18 | 18 | ||
| 19 | PLUGIN_TYPES = ["imager", "source"] | 19 | PLUGIN_TYPES = ["imager", "source"] |
| 20 | 20 | ||
| 21 | SCRIPTS_PLUGIN_DIR = "scripts/lib/wic/plugins" | 21 | SCRIPTS_PLUGIN_DIR = ["scripts/lib/wic/plugins", "lib/wic/plugins"] |
| 22 | 22 | ||
| 23 | logger = logging.getLogger('wic') | 23 | logger = logging.getLogger('wic') |
| 24 | 24 | ||
| @@ -38,10 +38,11 @@ class PluginMgr: | |||
| 38 | cls._plugin_dirs = [os.path.join(os.path.dirname(__file__), 'plugins')] | 38 | cls._plugin_dirs = [os.path.join(os.path.dirname(__file__), 'plugins')] |
| 39 | layers = get_bitbake_var("BBLAYERS") or '' | 39 | layers = get_bitbake_var("BBLAYERS") or '' |
| 40 | for layer_path in layers.split(): | 40 | for layer_path in layers.split(): |
| 41 | path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR) | 41 | for script_plugin_dir in SCRIPTS_PLUGIN_DIR: |
| 42 | path = os.path.abspath(os.path.expanduser(path)) | 42 | path = os.path.join(layer_path, script_plugin_dir) |
| 43 | if path not in cls._plugin_dirs and os.path.isdir(path): | 43 | path = os.path.abspath(os.path.expanduser(path)) |
| 44 | cls._plugin_dirs.insert(0, path) | 44 | if path not in cls._plugin_dirs and os.path.isdir(path): |
| 45 | cls._plugin_dirs.insert(0, path) | ||
| 45 | 46 | ||
| 46 | if ptype not in PLUGINS: | 47 | if ptype not in PLUGINS: |
| 47 | # load all ptype plugins | 48 | # load all ptype plugins |
