|
@@ -18,7 +18,7 @@ from wic.misc import get_bitbake_var
|
|
|
|
|
|
PLUGIN_TYPES = ["imager", "source"]
|
|
|
|
|
|
-SCRIPTS_PLUGIN_DIR = "scripts/lib/wic/plugins"
|
|
|
+SCRIPTS_PLUGIN_DIR = ["scripts/lib/wic/plugins", "lib/wic/plugins"]
|
|
|
|
|
|
logger = logging.getLogger('wic')
|
|
|
|
|
@@ -38,10 +38,11 @@ class PluginMgr:
|
|
|
cls._plugin_dirs = [os.path.join(os.path.dirname(__file__), 'plugins')]
|
|
|
layers = get_bitbake_var("BBLAYERS") or ''
|
|
|
for layer_path in layers.split():
|
|
|
- path = os.path.join(layer_path, SCRIPTS_PLUGIN_DIR)
|
|
|
- path = os.path.abspath(os.path.expanduser(path))
|
|
|
- if path not in cls._plugin_dirs and os.path.isdir(path):
|
|
|
- cls._plugin_dirs.insert(0, path)
|
|
|
+ for script_plugin_dir in SCRIPTS_PLUGIN_DIR:
|
|
|
+ path = os.path.join(layer_path, script_plugin_dir)
|
|
|
+ path = os.path.abspath(os.path.expanduser(path))
|
|
|
+ if path not in cls._plugin_dirs and os.path.isdir(path):
|
|
|
+ cls._plugin_dirs.insert(0, path)
|
|
|
|
|
|
if ptype not in PLUGINS:
|
|
|
# load all ptype plugins
|