From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
To: <isar-users@googlegroups.com>, <henning.schild@siemens.com>
Cc: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Subject: [PATCH v5 2/8] wic/plugins: Fix wic plugins to work with the latest wic
Date: Mon, 5 Oct 2020 22:23:01 +0530 [thread overview]
Message-ID: <20201005165307.14668-3-Vijaikumar_Kanagarajan@mentor.com> (raw)
In-Reply-To: <20201005165307.14668-1-Vijaikumar_Kanagarajan@mentor.com>
In the latest wic, wic.utils is removed and part of the implmentation
is moved to wic.misc. Fix the wic imports accordingly.
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +-
.../lib/wic/plugins/source/bootimg-pcbios-isar.py | 9 +++------
meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py | 2 +-
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
index 25b12ca..2285d2e 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -31,7 +31,7 @@ import shutil
from wic import WicError
from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
-from wic.utils.misc import (exec_cmd, get_bitbake_var, BOOTDD_EXTRA_SPACE)
+from wic.misc import (exec_cmd, get_bitbake_var, BOOTDD_EXTRA_SPACE)
logger = logging.getLogger('wic')
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
index 0423862..4d916d6 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
@@ -29,9 +29,8 @@ import os
from wic import WicError
from wic.engine import get_custom_config
-from wic.utils import runner
from wic.pluginbase import SourcePlugin
-from wic.utils.misc import (exec_cmd, exec_native_cmd,
+from wic.misc import (exec_cmd, exec_native_cmd,
get_bitbake_var, BOOTDD_EXTRA_SPACE)
logger = logging.getLogger('wic')
@@ -83,10 +82,8 @@ class BootimgPcbiosIsarPlugin(SourcePlugin):
logger.debug("Installing MBR on disk %s as %s with size %s bytes",
disk_name, full_path, disk.min_size)
- rcode = runner.show(['dd', 'if=%s' % mbrfile,
- 'of=%s' % full_path, 'conv=notrunc'])
- if rcode != 0:
- raise WicError("Unable to set MBR to %s" % full_path)
+ dd_cmd = "dd if=%s of=%s conv=notrunc" % (mbrfile, full_path)
+ exec_cmd(dd_cmd, native_sysroot)
@classmethod
def do_configure_partition(cls, part, source_params, creator, cr_workdir,
diff --git a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py
index f60afb8..3ac0aa0 100644
--- a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py
+++ b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py
@@ -18,7 +18,7 @@ import os
from wic import WicError
from wic.plugins.source.rootfs import RootfsPlugin
-from wic.utils.misc import exec_cmd
+from wic.misc import exec_cmd
logger = logging.getLogger('wic')
--
2.17.1
next prev parent reply other threads:[~2020-10-05 16:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 16:52 [PATCH v5 0/8] WIC update Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 1/8] wic: Update to the latest wic from openembedded core Vijai Kumar K
2020-10-05 16:53 ` Vijai Kumar K [this message]
2020-10-05 16:53 ` [PATCH v5 3/8] wic-img: Satisfy the quirks of latest wic Vijai Kumar K
2020-10-14 8:59 ` vijaikumar....@gmail.com
2020-10-05 16:53 ` [PATCH v5 4/8] wic_fakeroot: Handle standalone pseudo invocations Vijai Kumar K
2020-10-05 16:55 ` [PATCH v5 5/8] meta-isar/conf: Add provision to debug WIC Vijai Kumar K
2020-10-05 16:55 ` [PATCH v5 6/8] debian-common: Add tar as a dependency for wic Vijai Kumar K
2020-10-05 16:55 ` [PATCH v5 7/8] Fix legacy bios boot partition Vijai Kumar K
2020-10-05 16:55 ` [PATCH v5 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint Vijai Kumar K
2020-10-05 16:59 ` [PATCH v5 0/8] WIC update vijaikumar....@gmail.com
2020-10-06 4:55 ` vijaikumar....@gmail.com
2020-10-06 9:13 ` Baurzhan Ismagulov
2020-10-07 10:49 ` vijaikumar....@gmail.com
2020-10-13 18:22 ` Jan Kiszka
2020-10-13 18:30 ` Jan Kiszka
2020-10-14 5:56 ` vijaikumar....@gmail.com
2020-10-14 13:23 ` vijaikumar....@gmail.com
2020-10-14 5:54 ` vijaikumar....@gmail.com
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=20201005165307.14668-3-Vijaikumar_Kanagarajan@mentor.com \
--to=vijaikumar_kanagarajan@mentor.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/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