Rename image same with ks name
authorGui Chen <gui.chen@intel.com>
Thu, 18 Aug 2011 02:42:14 +0000 (10:42 +0800)
committerGui Chen <gui.chen@intel.com>
Thu, 18 Aug 2011 02:42:14 +0000 (10:42 +0800)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/imager/baseimager.py
mic/imager/loop.py

index fda2232..233e65a 100644 (file)
@@ -69,7 +69,7 @@ class BaseImageCreator(object):
             self.repometadata = createopts['repomd']
 
             # A name for the image."""
-            self.name = 'output'
+            self.name = createopts['name']
 
             # The directory in which all temporary files will be created."""
             self.tmpdir = createopts['tmpdir']
index b611b82..29962fc 100644 (file)
@@ -103,7 +103,7 @@ class LoopImageCreator(BaseImageCreator):
     def __get_image(self):
         if self.__imgdir is None:
             raise CreatorError("_image is not valid before calling mount()")
-        return self.__imgdir + "/meego.img"
+        return os.path.join(self.__imgdir, self._img_name) 
     #The location of the image file.
     #
     #This is the path to the filesystem image. Subclasses may use this path