Patchwork [06/10] wic: Remove rpm and grabber dependencies from BaseImageCreator

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date Oct. 22, 2013, 2:24 p.m.
Message ID <10b4f56c2bd1951922f9fe36eb8275f0f2079a3f.1382451106.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/60379/
State Accepted
Commit f2ca93e61e575586b8a1589602812d11c4a1fc28
Headers show

Comments

tom.zanussi@linux.intel.com - Oct. 22, 2013, 2:24 p.m.
BaseImageCreator is a base class for DirectImageCreator and others,
and imports rpm and grabber (which imports rpm).

The various plugins e.g. DirectPlugin import the creators and
therefore these dependencies, which manifest at run-time as e.g.:

  Warning: Failed to load plugin imager/direct_plugin: No module named
    rpm

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/mic/imager/baseimager.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/scripts/lib/mic/imager/baseimager.py b/scripts/lib/mic/imager/baseimager.py
index 4d6be29..b721249 100644
--- a/scripts/lib/mic/imager/baseimager.py
+++ b/scripts/lib/mic/imager/baseimager.py
@@ -26,12 +26,10 @@  import re
 import tarfile
 import glob
 
-import rpm
-
 from mic import kickstart
 from mic import msger
 from mic.utils.errors import CreatorError, Abort
-from mic.utils import misc, grabber, runner, fs_related as fs
+from mic.utils import misc, runner, fs_related as fs
 
 class BaseImageCreator(object):
     """Installs a system to a chroot directory.