public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Wadim Klincov <wadim@klincov.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH] Add missing WicError import
Date: Wed, 16 Mar 2022 09:12:48 +0000	[thread overview]
Message-ID: <05873484-d92b-59ca-e61b-faf1359a8c1c@klincov.com> (raw)
In-Reply-To: <20220316092405.2044eb0f@md1za8fc.ad001.siemens.net>

On 3/16/22 09:24, Henning Schild wrote:
> Am Mon, 14 Mar 2022 10:55:53 +0000
> schrieb Wadim Klincov <wadim@klincov.com>:
>
>> This patch adds the missing import of `WicError`, making any
>> potential errors when building wic images easier to understand.
>>
>> Signed-off-by: Wadim Klincov <wadim@klincov.com>
>> ---
>>   meta/scripts/lib/wic/plugins/isarpluginbase.py | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/scripts/lib/wic/plugins/isarpluginbase.py
>> b/meta/scripts/lib/wic/plugins/isarpluginbase.py index
>> 185e2ea..68af220 100644 ---
>> a/meta/scripts/lib/wic/plugins/isarpluginbase.py +++
>> b/meta/scripts/lib/wic/plugins/isarpluginbase.py @@ -8,6 +8,8 @@
>>
>>   import os
>>
>> +from wic import WicError
>> +
>
> This is already done in all the plugins we have in tree. The file you
> are touching here is "what we need to fork", and we do not need that.
> Or does the import in the existing plugins also not work?
>
> In case you need that in your custom plugin, just include the import
> into your own plugin. Maybe you do not even need that "base" lib for
> your custom plugin. Since it is ... what we need to fork. Not what we
> might need for our own plugins.
>

Thanks for your reply!

Do you mean `isarpluginbase.py` is something I, as a user, should fork
and change to my liking? Right now using `BootimgEFIPlugin` (or a
slightly modified version for better resolution) works great and it
wasn't clear that it's not something which should be used.

The issue on my side happens when `BootimgEFIPlugin` calls
`isar_get_filenames` and the kernel is not available for whatever
reason. In this case `isar_get_filenames` tries to raise `WicError`, but
since it's not imported directly in `isarpluginbase.py` a bitbake error
is thrown instead. It's still clear that the kernel is not available,
it's just not very readable.

> regards,
> Henning
>
>>   def isar_populate_boot_cmd(rootfs_dir, hdddir):
>>       # copy all files from rootfs/boot into boot partition
>>       # no not copy symlinks (ubuntu places them here) because
>> targetfs is fat --
>> 2.35.1
>>
>>
>
Wadim


  parent reply	other threads:[~2022-03-16  9:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 10:55 Wadim Klincov
2022-03-16  8:24 ` Henning Schild
2022-03-16  9:03   ` Anton Mikanovich
2022-03-16 10:12     ` Henning Schild
2022-03-16  9:12   ` Wadim Klincov [this message]
2022-03-16 11:13     ` Henning Schild
2022-03-17  9:00       ` Wadim Klincov
2022-03-21 15:02 ` Anton Mikanovich

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=05873484-d92b-59ca-e61b-faf1359a8c1c@klincov.com \
    --to=wadim@klincov.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