From: "akuster" <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [zeus 3/7] wic: align layer plugin path
Date: Mon, 27 Apr 2020 19:15:52 -0700 [thread overview]
Message-ID: <8351cb19e8a83157143b1df61cd9bbb71282e9fc.1587931177.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1587931177.git.akuster808@gmail.com>
From: Lee Chee Yang <chee.yang.lee@intel.com>
wic look for external layer source plugin under scripts/lib/
while other tools look for lib/.
allow wic to check for source plugin at both scripts/lib/ and
lib/ to align with other tools while avoid breaking any existing
source plugin in external layer.
[YOCTO #13056]
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 986baff26bd96a6265f5fe2d631818fff9f66374)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
scripts/lib/wic/help.py | 3 ++-
scripts/lib/wic/pluginbase.py | 11 ++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index 3a40fc0ea29..03d84bd1d72 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -523,7 +523,8 @@ DESCRIPTION
Source plugins can also be implemented and added by external
layers - any plugins found in a scripts/lib/wic/plugins/source/
- directory in an external layer will also be made available.
+ or lib/wic/plugins/source/ directory in an external layer will
+ also be made available.
When the wic implementation needs to invoke a partition-specific
implementation, it looks for the plugin that has the same name as
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index f74d6430fd7..d9b4e57747e 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -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
--
2.17.1
next prev parent reply other threads:[~2020-04-28 2:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 2:15 [zeus 0/7] Merge request akuster
2020-04-28 2:15 ` [zeus 1/7] cve-check: CPE version '-' as all version akuster
2020-04-28 2:15 ` [zeus 2/7] pseudo: Ensure we use our own libsqlite akuster
2020-04-28 2:15 ` akuster [this message]
2020-04-28 2:15 ` [zeus 4/7] inetutils: Use alternatives to avoid manpage conflict akuster
2020-04-28 2:15 ` [zeus 5/7] openssl: recommend cryptodev-module for corresponding PACKAGECONFIG akuster
2020-04-28 2:15 ` [zeus 6/7] openssl: Upgrade 1.1.1d -> 1.1.1e akuster
2020-04-28 2:15 ` [zeus 7/7] openssl: update to 1.1.1f akuster
2020-04-28 16:13 ` [OE-core] [zeus 0/7] Merge request Jan Luebbe
2020-04-28 17:09 ` akuster
2020-05-04 13:42 ` Jan Luebbe
2020-05-04 14:18 ` Steve Sakoman
2020-04-28 18:07 ` Martin Jansa
2020-04-29 4:35 ` Anuj Mittal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8351cb19e8a83157143b1df61cd9bbb71282e9fc.1587931177.git.akuster808@gmail.com \
--to=akuster808@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox