summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/pluginbase.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/pluginbase.py')
-rw-r--r--scripts/lib/wic/pluginbase.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index 2f747a91de..aea9c02319 100644
--- a/scripts/lib/wic/pluginbase.py
+++ b/scripts/lib/wic/pluginbase.py
@@ -17,9 +17,11 @@
17 17
18__all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins'] 18__all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins']
19 19
20import logging
21
20from collections import defaultdict 22from collections import defaultdict
21 23
22from wic import msger 24logger = logging.getLogger('wic')
23 25
24class PluginMeta(type): 26class PluginMeta(type):
25 plugins = defaultdict(dict) 27 plugins = defaultdict(dict)
@@ -49,7 +51,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
49 disk image. This provides a hook to allow finalization of a 51 disk image. This provides a hook to allow finalization of a
50 disk image e.g. to write an MBR to it. 52 disk image e.g. to write an MBR to it.
51 """ 53 """
52 msger.debug("SourcePlugin: do_install_disk: disk: %s" % disk_name) 54 logger.debug("SourcePlugin: do_install_disk: disk: %s", disk_name)
53 55
54 @classmethod 56 @classmethod
55 def do_stage_partition(cls, part, source_params, creator, cr_workdir, 57 def do_stage_partition(cls, part, source_params, creator, cr_workdir,
@@ -66,7 +68,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
66 Not that get_bitbake_var() allows you to acces non-standard 68 Not that get_bitbake_var() allows you to acces non-standard
67 variables that you might want to use for this. 69 variables that you might want to use for this.
68 """ 70 """
69 msger.debug("SourcePlugin: do_stage_partition: part: %s" % part) 71 logger.debug("SourcePlugin: do_stage_partition: part: %s", part)
70 72
71 @classmethod 73 @classmethod
72 def do_configure_partition(cls, part, source_params, creator, cr_workdir, 74 def do_configure_partition(cls, part, source_params, creator, cr_workdir,
@@ -77,7 +79,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
77 custom configuration files for a partition, for example 79 custom configuration files for a partition, for example
78 syslinux or grub config files. 80 syslinux or grub config files.
79 """ 81 """
80 msger.debug("SourcePlugin: do_configure_partition: part: %s" % part) 82 logger.debug("SourcePlugin: do_configure_partition: part: %s", part)
81 83
82 @classmethod 84 @classmethod
83 def do_prepare_partition(cls, part, source_params, creator, cr_workdir, 85 def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
@@ -87,7 +89,7 @@ class SourcePlugin(PluginMeta("Plugin", (), {})):
87 Called to do the actual content population for a partition i.e. it 89 Called to do the actual content population for a partition i.e. it
88 'prepares' the partition to be incorporated into the image. 90 'prepares' the partition to be incorporated into the image.
89 """ 91 """
90 msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part) 92 logger.debug("SourcePlugin: do_prepare_partition: part: %s", part)
91 93
92def get_plugins(typen): 94def get_plugins(typen):
93 return PluginMeta.plugins.get(typen) 95 return PluginMeta.plugins.get(typen)