diff options
| author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-08-04 14:27:52 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-11 10:53:10 +0100 |
| commit | df42125f2c2065e13d96ef9cfb21bb4a59c90ec3 (patch) | |
| tree | 6d992a3b436b60b4ac5c665606efc4fc108ac203 /scripts/lib/mic/pluginbase.py | |
| parent | 946dbec4ebde9a875dfc1213e8449cf11c92fbab (diff) | |
| download | poky-df42125f2c2065e13d96ef9cfb21bb4a59c90ec3.tar.gz | |
wic: Remove unused plugin and error code
wic doesn't use it, so remove it.
(From OE-Core rev: b818e5a1ed047940fda533da73fc50a099e1aa3f)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic/pluginbase.py')
| -rw-r--r-- | scripts/lib/mic/pluginbase.py | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/scripts/lib/mic/pluginbase.py b/scripts/lib/mic/pluginbase.py index 9cf4c628d1..46a4f4a6b6 100644 --- a/scripts/lib/mic/pluginbase.py +++ b/scripts/lib/mic/pluginbase.py | |||
| @@ -40,45 +40,10 @@ class _Plugin(object): | |||
| 40 | def get_plugins(cls): | 40 | def get_plugins(cls): |
| 41 | return cls.plugins | 41 | return cls.plugins |
| 42 | 42 | ||
| 43 | |||
| 43 | class ImagerPlugin(_Plugin): | 44 | class ImagerPlugin(_Plugin): |
| 44 | mic_plugin_type = "imager" | 45 | mic_plugin_type = "imager" |
| 45 | 46 | ||
| 46 | @classmethod | ||
| 47 | def check_image_exists(self, destdir, apacking=None, | ||
| 48 | images=(), | ||
| 49 | release=None): | ||
| 50 | |||
| 51 | # if it's a packing file, reset images | ||
| 52 | if apacking: | ||
| 53 | images = [apacking] | ||
| 54 | |||
| 55 | # release option will override images | ||
| 56 | if release is not None: | ||
| 57 | images = [os.path.basename(destdir.rstrip('/'))] | ||
| 58 | destdir = os.path.dirname(destdir.rstrip('/')) | ||
| 59 | |||
| 60 | for name in images: | ||
| 61 | if not name: | ||
| 62 | continue | ||
| 63 | |||
| 64 | image = os.path.join(destdir, name) | ||
| 65 | if not os.path.exists(image): | ||
| 66 | continue | ||
| 67 | |||
| 68 | if msger.ask("Target image/dir: %s already exists, " | ||
| 69 | "clean up and continue?" % image): | ||
| 70 | if os.path.isdir(image): | ||
| 71 | shutil.rmtree(image) | ||
| 72 | else: | ||
| 73 | os.unlink(image) | ||
| 74 | else: | ||
| 75 | raise errors.Abort("Cancled") | ||
| 76 | |||
| 77 | def do_create(self): | ||
| 78 | pass | ||
| 79 | |||
| 80 | def do_chroot(self): | ||
| 81 | pass | ||
| 82 | 47 | ||
| 83 | class SourcePlugin(_Plugin): | 48 | class SourcePlugin(_Plugin): |
| 84 | mic_plugin_type = "source" | 49 | mic_plugin_type = "source" |
| @@ -133,12 +98,6 @@ class SourcePlugin(_Plugin): | |||
| 133 | """ | 98 | """ |
| 134 | msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part) | 99 | msger.debug("SourcePlugin: do_prepare_partition: part: %s" % part) |
| 135 | 100 | ||
| 136 | class BackendPlugin(_Plugin): | ||
| 137 | mic_plugin_type="backend" | ||
| 138 | |||
| 139 | def addRepository(self): | ||
| 140 | pass | ||
| 141 | |||
| 142 | def get_plugins(typen): | 101 | def get_plugins(typen): |
| 143 | ps = ImagerPlugin.get_plugins() | 102 | ps = ImagerPlugin.get_plugins() |
| 144 | if typen in ps: | 103 | if typen in ps: |
| @@ -146,4 +105,4 @@ def get_plugins(typen): | |||
| 146 | else: | 105 | else: |
| 147 | return None | 106 | return None |
| 148 | 107 | ||
| 149 | __all__ = ['ImagerPlugin', 'BackendPlugin', 'SourcePlugin', 'get_plugins'] | 108 | __all__ = ['ImagerPlugin', 'SourcePlugin', 'get_plugins'] |
