loop taring-to feature support macro replacing
authorJF Ding <jian-feng.ding@intel.com>
Fri, 2 Mar 2012 09:01:42 +0000 (17:01 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Fri, 2 Mar 2012 09:03:06 +0000 (17:03 +0800)
@NAME@ can be replaced with acutal image name
and a quick solution for the tarball content

mic/imager/loop.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 8838a35..0da090d
@@ -34,6 +34,10 @@ def save_mountpoints(dpath, loops):
     :loops, list of tuple (mp, label, name, size, fstype)
     """
 
+    # quick dirty fix: odin decline any extra file in tarball
+    # FIXME: better solution to save this file outside tarball
+    return None
+
     if not loops:
         return None
 
@@ -84,7 +88,10 @@ class LoopImageCreator(BaseImageCreator):
         """
 
         BaseImageCreator.__init__(self, creatoropts, pkgmgr)
+
         self.taring_to = taring_to
+        if taring_to and '@NAME@' in taring_to:
+            self.taring_to = taring_to.replace('@NAME@', self.name)
 
         self.__fslabel = None
         self.fslabel = self.name