clean up the mess message of directory not empty
authorGui Chen <gui.chen@intel.com>
Tue, 15 Jan 2013 13:15:11 +0000 (21:15 +0800)
committerGui Chen <gui.chen@intel.com>
Mon, 21 Jan 2013 17:38:02 +0000 (01:38 +0800)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/chroot.py

index ed867df..ce62639 100644 (file)
@@ -124,7 +124,7 @@ def setup_chrootenv(chrootdir, bindmounts = None, mountparent = True):
                 continue
 
             if srcdst[0] in BIND_MOUNTS or srcdst[0] == '/':
-                msger.warning("%s will be mounted by default." % srcdst[0])
+                msger.verbose("%s will be mounted by default." % srcdst[0])
                 continue
 
             if srcdst[1] == "" or srcdst[1] == "none":
@@ -225,7 +225,10 @@ def cleanup_chrootenv(chrootdir, bindmounts = None, globalmounts = []):
             srcdst = mount.split(":")
 
             if len(srcdst) == 1:
-               srcdst.append("none")
+                srcdst.append("none")
+
+            if srcdst[0] == "/":
+                continue
 
             if srcdst[1] == "" or srcdst[1] == "none":
                 srcdst[1] = srcdst[0]