aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic/imager/baseimager.py
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-08-08 10:09:12 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-11 10:52:18 +0100
commit94e15c18c011b0d7d71276cd4566be2417c2c6be (patch)
tree29c05167f89065cc02c677425a573a8140665ee4 /scripts/lib/mic/imager/baseimager.py
parentfb2a162d8756ab69c9c29a0715b033f18620341d (diff)
downloadopenembedded-core-contrib-94e15c18c011b0d7d71276cd4566be2417c2c6be.tar.gz
wic: Update/rename/delete mount-related code
The wic code inherited a basic image-creation flow based on mounting loop devices, but wic doesn't actually mount anything, so rename parts of the code dealing with mounting to something more appropriate, and remove related unused code. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Diffstat (limited to 'scripts/lib/mic/imager/baseimager.py')
-rw-r--r--scripts/lib/mic/imager/baseimager.py47
1 files changed, 9 insertions, 38 deletions
diff --git a/scripts/lib/mic/imager/baseimager.py b/scripts/lib/mic/imager/baseimager.py
index 0d591eaf43..7f32dd559e 100644
--- a/scripts/lib/mic/imager/baseimager.py
+++ b/scripts/lib/mic/imager/baseimager.py
@@ -97,41 +97,15 @@ class BaseImageCreator(object):
#
- # Properties
- #
- def __get_instroot(self):
- if self.__builddir is None:
- raise CreatorError("_instroot is not valid before calling mount()")
- return self.__builddir + "/install_root"
- _instroot = property(__get_instroot)
- """The location of the install root directory.
-
- This is the directory into which the system is installed. Subclasses may
- mount a filesystem image here or copy files to/from here.
-
- Note, this directory does not exist before ImageCreator.mount() is called.
-
- Note also, this is a read-only attribute.
-
- """
-
-
- #
# Hooks for subclasses
#
- def _mount_instroot(self, base_on = None):
- """Mount or prepare the install root directory.
+ def _create(self):
+ """Create partitions for the disk image(s)
- This is the hook where subclasses may prepare the install root by e.g.
- mounting creating and loopback mounting a filesystem image to
- _instroot.
+ This is the hook where subclasses may create the partitions
+ that will be assembled into disk image(s).
There is no default implementation.
-
- base_on -- this is the value passed to mount() and can be interpreted
- as the subclass wishes; it might e.g. be the location of
- a previously created ISO containing a system image.
-
"""
pass
@@ -176,19 +150,16 @@ class BaseImageCreator(object):
runner.show('umount -l %s' % self.workdir)
- def mount(self):
- """Setup the target filesystem in preparation for an install.
+ def create(self):
+ """Create partitions for the disk image(s)
- This function sets up the filesystem which the ImageCreator will
- install into and configure. The ImageCreator class merely creates an
- install root directory, bind mounts some system directories (e.g. /dev)
- and writes out /etc/fstab. Other subclasses may also e.g. create a
- sparse file, format it and loopback mount it to the install root.
+ Create the partitions that will be assembled into disk
+ image(s).
"""
self.__setup_tmpdir()
self.__ensure_builddir()
- self._mount_instroot()
+ self._create()
def unmount(self):
"""Unmounts the target filesystem.