* [PATCH] wic: bootimg-efi-isar: use static method for _copy_additional_files
@ 2024-03-25 8:49 srinuvasan.a
2024-03-25 13:30 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: srinuvasan.a @ 2024-03-25 8:49 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Srinuvasan A
From: Srinuvasan A <srinuvasan.a@siemens.com>
Presently we uses classmethod decorator for _copy_additional_files
method, and actually this not needed becuase we are not accessing any
class variable or method in this function.
Change to static method for the below reason
- We are performing the generic functionality
- Moreover this should be initialized only once
Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 4 ++--
1 file changed, 2 insertions(+), 2 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 4bfb70a0..5fe9bcb0 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
@@ -40,8 +40,8 @@ class BootimgEFIPlugin(SourcePlugin):
name = 'bootimg-efi-isar'
- @classmethod
- def _copy_additional_files(cls, hdddir, initrd, dtb):
+ @staticmethod
+ def _copy_additional_files(hdddir, initrd, dtb):
bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
if not bootimg_dir:
raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wic: bootimg-efi-isar: use static method for _copy_additional_files
2024-03-25 8:49 [PATCH] wic: bootimg-efi-isar: use static method for _copy_additional_files srinuvasan.a
@ 2024-03-25 13:30 ` Jan Kiszka
2024-03-25 13:54 ` Srinuvasan Arjunan
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2024-03-25 13:30 UTC (permalink / raw)
To: srinuvasan.a, isar-users
On 25.03.24 09:49, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
>
> Presently we uses classmethod decorator for _copy_additional_files
> method, and actually this not needed becuase we are not accessing any
> class variable or method in this function.
>
> Change to static method for the below reason
> - We are performing the generic functionality
> - Moreover this should be initialized only once
>
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 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 4bfb70a0..5fe9bcb0 100644
> --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> @@ -40,8 +40,8 @@ class BootimgEFIPlugin(SourcePlugin):
>
> name = 'bootimg-efi-isar'
>
> - @classmethod
> - def _copy_additional_files(cls, hdddir, initrd, dtb):
> + @staticmethod
> + def _copy_additional_files(hdddir, initrd, dtb):
> bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
> if not bootimg_dir:
> raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
This is not Isar-specific. Please address this in OE first.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wic: bootimg-efi-isar: use static method for _copy_additional_files
2024-03-25 13:30 ` Jan Kiszka
@ 2024-03-25 13:54 ` Srinuvasan Arjunan
0 siblings, 0 replies; 3+ messages in thread
From: Srinuvasan Arjunan @ 2024-03-25 13:54 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1570 bytes --]
On Monday, March 25, 2024 at 7:00:51 PM UTC+5:30 Jan Kiszka wrote:
On 25.03.24 09:49, srinuvasan.a via isar-users wrote:
> From: Srinuvasan A <srinuv...@siemens.com>
>
> Presently we uses classmethod decorator for _copy_additional_files
> method, and actually this not needed becuase we are not accessing any
> class variable or method in this function.
>
> Change to static method for the below reason
> - We are performing the generic functionality
> - Moreover this should be initialized only once
>
> Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
> ---
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 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 4bfb70a0..5fe9bcb0 100644
> --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
> @@ -40,8 +40,8 @@ class BootimgEFIPlugin(SourcePlugin):
>
> name = 'bootimg-efi-isar'
>
> - @classmethod
> - def _copy_additional_files(cls, hdddir, initrd, dtb):
> + @staticmethod
> + def _copy_additional_files(hdddir, initrd, dtb):
> bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
> if not bootimg_dir:
> raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
This is not Isar-specific. Please address this in OE first.
Sure, thanks.
Jan
--
Siemens AG, Technology
Linux Expert Center
[-- Attachment #1.2: Type: text/html, Size: 2302 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-25 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 8:49 [PATCH] wic: bootimg-efi-isar: use static method for _copy_additional_files srinuvasan.a
2024-03-25 13:30 ` Jan Kiszka
2024-03-25 13:54 ` Srinuvasan Arjunan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox