Commits

Rodrigo Bistolfi committed 10d53a8

Removed debugging checks and prints

Comments (0)

Files changed (6)

vinstall/backend/installmedia.py

     conf = "veclinux/VINSTALL.INI"
     config = ConfigParser.RawConfigParser()
     config.optionxform = str
-    print mnt,conf
     config.read(os.path.join(mnt,conf))
     return config
 

vinstall/backend/utils.py

 
     """
     command = 'mount -t %s %s %s' % (filesystem, src, mountpoint)
-    print command
     subprocess.call(command.split())
     return mountpoint
 

vinstall/controller/automatic.py

         """Do automatic partitioning in disk
 
         """
-        print "Partitioning", disk
-
-        if not self._check_continue():
-            return
-
         available_ram = int(utils.get_mem_size())
 
         if available_ram <= 512:
         disk_size = disk.size(unit="MiB")
         partitioner = partitioning.DiskPartitioner(disk)
         if not disk.has_partition_table:
-            print "Creating partition table"
             partitioner.create_partition_table()
         else:
             partitioner.delete_all_partitions()
         """Format partitions in disk with the default filesystem
 
         """
-        print "Formatting partitions in", disk
-
-        if not self._check_continue():
-            return
-
         proot = "%s%s" % (disk.path(), 1)
         pswap = "%s%s" % (disk.path(), 2)
         utils.umount('/mnt/TARGET')
         In automatic mode this should be every package in the iso.
 
         """
-        print "Looking for packages"
         excluded =("vlconfig2", "vlsetup", "aaa_base", "VL_Theme")
         for root, dirs, files in os.walk("/mnt/SOURCE/packages"):
             for file in files:
         """Install package in the disk root partition
 
         """
-        print "Installing %s in %s" % (package, disk)
         command = "/usr/sbin/installpkg %s --root=%s" % (package, "/mnt/TARGET")
-        if self._check_continue():
-            subprocess.check_call(command.split())
+        subprocess.check_call(command.split())
 
     def preinstall(self):
         """Run before installing packages, used for installing required
         packages first.
 
         """
-        if not self._check_continue():
-            return
-
         aaa = glob.glob("/mnt/SOURCE/packages/a/aaa_base-*.t?z")[0]
         self.installpkg(aaa, "/mnt/TARGET")
 
         installed at last, or for post install required tasks.
 
         """
-        if not self._check_continue():
-            return
         theme = glob.glob("/mnt/SOURCE/packages/xconf/VL_Theme-*.t?z")[0]
         vlconfig = glob.glob("/mnt/SOURCE/packages/a/vlconfig2-*.t?z")[0]
         self.installpkg(theme)
         Represented in VINSTALL.INI as "sata=version"
 
         """
-        if not self._check_continue():
-            return
-
         install_media = self.config["install_media"]
         kernel_version = install_media.config.get("kernels", "sata")
         kernel_version = kernel_version.replace("\"", "")
         """Create and install a fstab file in disk
 
         """
-        print "Installing fstab in", disk
-        if not self._check_continue():
-            return
-
         fstab_obj = fstab.Fstab("/mnt/TARGET/etc/fstab")
         root_entry = fstab.FstabEntry(device = "%s1" % disk.path(),
                 mountpoint = "/", filesystem = self.ROOT_FS)
         """
         #XXX:  Define the default set of services for each runlevel
         # At some other location so they can be used by advanced.py too
-
-        if not self._check_continue():
-            return
-
         svcbasic = [ "cron", "portmap", "lm_sensors", "gpm", "inetd" ]
         svc2 = svcbasic[:]
         svc3 = svcbasic[:]
         """Install the default bootloader in disk
 
         """
-        print "Installing bootloader in", disk
-
-        if not self._check_continue():
-            return
-
         grub = bootloader.Grub2(target=disk.path())
         with utils.Chroot("/mnt/TARGET"):
             grub.write_config()
         in VINSTALL.INI
 
         """
-        print "Writing vector-version"
-
-        if not self._check_continue():
-            return
-
         install_media = self.config["install_media"]
         distro = install_media.config.get("general", "distro").replace("\"", "")
         version = install_media.config.get("general", "version").replace("\"", "")
         Later steps will need this when we chroot there
 
         """
-        if not self._check_continue():
-            return
-
         for point in ("sys","proc","dev"):
             cmd = "mount -o bind /%s /mnt/TARGET/%s" % (point, point)
             subprocess.check_call(cmd.split())
         """Clear the mountpoints that were mounted for the configuration
 
         """
-        if not self._check_continue():
-            return
-
         for point in ("sys","proc","dev"):
             cmd = "umount -f /mnt/TARGET/%s" % point
             subprocess.check_call(cmd.split())
 
-    def _check_continue(self):
-        return 'I_MEAN_IT' in os.environ
-
-
 
 class UserSetup(object):
     """Minimal configuration - Ask for username and passwords
         """Set the root password
 
         """
-        if not self._check_continue():
-            return
-
         admin = users.User()
         admin.root = "/mnt/TARGET"
         admin.login = "root"
         """Create a user account and set its password
 
         """
-        if not self._check_continue():
-            return
-
         account = users.User()
         account.root = "/mnt/TARGET"
         account.login = username
         with utils.Chroot("/mnt/TARGET"):
             account.create()
 
-    def _check_continue(self):
-        return 'I_MEAN_IT' in os.environ
-

vinstall/controller/mountpoints.py

         to_format = []
         to_mount = []
         for partition, (mount, fs) in mountpoints.items():
-            print partition, mount, fs
             if fs:
                 to_format.append((partition, fs))
             if mount:

vinstall/controller/packages.py

         install_media = self.config["install_media"]
         if install_media.is_iso():
             if not os.path.exists(install_media.path):
-		print "mount container here"
+                print "mount container here"
             utils.mountiso(install_media.path, mountpoint)
         else:
             utils.mount(install_media.path, mountpoint, filesystem="auto")

vinstall/controller/usersetup.py

         """Set the root password
 
         """
-        if not self._check_continue():
-            return
-
         admin = users.User()
         admin.root = "/mnt/TARGET"
         admin.login = "root"
         """Create a user account and set its password
 
         """
-        if not self._check_continue():
-            return
-
         account = users.User()
         account.root = "/mnt/TARGET"
         account.login = username
         """Create and install a fstab file in disk
 
         """
-        if not self._check_continue():
-            return
-
         fstab_obj = fstab.Fstab("/mnt/TARGET/etc/fstab")
 
         mountpoints = self.config.get("mountpoints")
         for dev, mount, fs in mountpoints:
-            print dev, mount, fs
             if not fs:
                 fs = dev.query_filesystem()
 
         """Setup default system services
 
         """
-        if not self._check_continue():
-            return
-
         svcbasic = [ "cron", "portmap", "lm_sensors", "gpm", "inetd" ]
         svc2 = svcbasic[:]
         svc3 = svcbasic[:]
                 if svc.name in s:
                     svc.enable(runlevel)
 
-    def _check_continue(self):
-        return 'I_MEAN_IT' in os.environ
-