[Uludag-commits] r17550 - in branches/yali4/yali4: . gui

uludag-commits at pardus.org.tr uludag-commits at pardus.org.tr
1 Nis 2008 Sal 19:54:09 EEST


Author: gokmen.goksel
Date: Tue Apr  1 19:54:09 2008
New Revision: 17550

Modified:
   branches/yali4/yali4/bootloader.py
   branches/yali4/yali4/constants.py
   branches/yali4/yali4/filesystem.py
   branches/yali4/yali4/gui/ScrGoodbye.py
   branches/yali4/yali4/gui/context.py
   branches/yali4/yali4/gui/debugger.py
   branches/yali4/yali4/partitiontype.py
   branches/yali4/yali4/pisiiface.py
Log:
 * We dont need to check is file system supported by kernel :)
 * Use logging system..
 * We still have some DBUS problems Houston.



Modified: branches/yali4/yali4/bootloader.py
=================================================================
--- branches/yali4/yali4/bootloader.py	(original)
+++ branches/yali4/yali4/bootloader.py	Tue Apr  1 19:54:09 2008
@@ -23,7 +23,7 @@
 import yali4.partitiontype as parttype
 import yali4.partitionrequest as request
 from yali4.partitionrequest import partrequests
-import yali4.gui.context as ctx
+from yali4.constants import consts
 
 grub_conf_tmp = """\
 default 0
@@ -135,7 +135,11 @@
                 It also cleans unnecessary options """
             s = []
             # Get parameters from cmdline.
-            for i in [x for x in open("/proc/cmdline", "r").read().split() if not x.startswith("init=") and not x.startswith("xorg=") and not x.startswith("yali=") and not x.startswith(ctx.consts.kahyaParam)]:
+            for i in [x for x in open("/proc/cmdline", "r").read().split() \
+                        if not x.startswith("init=") \
+                       and not x.startswith("xorg=") \
+                       and not x.startswith("yali=") \
+                       and not x.startswith(consts.kahyaParam)]:
                 if i.startswith("root="):
                     s.append("root=/dev/%s" % (root))
                 elif i.startswith("mudur="):

Modified: branches/yali4/yali4/constants.py
=================================================================
--- branches/yali4/yali4/constants.py	(original)
+++ branches/yali4/yali4/constants.py	Tue Apr  1 19:54:09 2008
@@ -64,7 +64,7 @@
 consts.source_dir = join(consts.mnt_dir, "cdrom")
 
 # dbus socket path
-consts.dbus_socket_file = consts.target_dir + "/var/run/dbus/system_bus_socket"
+consts.dbus_socket_file = join(consts.target_dir, "var/run/dbus/system_bus_socket")
 
 # swap file path
 consts.swap_file_name = ".swap"

Modified: branches/yali4/yali4/filesystem.py
=================================================================
--- branches/yali4/yali4/filesystem.py	(original)
+++ branches/yali4/yali4/filesystem.py	Tue Apr  1 19:54:09 2008
@@ -60,7 +60,6 @@
     _fs_type = None  # parted fs type
 
     def __init__(self):
-        self.readSupportedFilesystems()
         self._fs_type = parted.file_system_type_get(self._name)
 
     def openPartition(self, partition):
@@ -114,42 +113,16 @@
             count += 1
         return new_label
 
-    def readSupportedFilesystems(self):
-        """ Check the supported file systems by kernel """
-        f = open("/proc/filesystems", 'r')
-        for line in f.readlines():
-            line = line.split()
-            if line[0] == "nodev":
-                self._filesystems.append(line[1])
-            else:
-                self._filesystems.append(line[0])
-
-        # append swap manually
-        self._filesystems.append("swap")
-
-        # append vfat manually
-        self._filesystems.append("fat32")
-
-    def isSupported(self):
-        """ Check if file system is supported by kernel """
-        if self.name() in self._filesystems:
-            return True
-        return False
-
     def preFormat(self, partition):
         """ Necessary checks before formatting """
         e = ""
-        if not self.isSupported():
-            e = "%s file system is not supported by kernel." %(self.name())
-
         if not self.isImplemented():
             e = "%s file system is not fully implemented." %(self.name())
-
         if e:
             raise YaliException, e
 
-        #FIXME: use logging system
-        print "format %s: %s" %(partition.getPath(), self.name())
+        import yali4.gui.context as ctx
+        ctx.debugger.log("Format %s: %s" %(partition.getPath(), self.name()))
 
     def setImplemented(self, bool):
         """ Set if file system is implemented """

Modified: branches/yali4/yali4/gui/ScrGoodbye.py
=================================================================
--- branches/yali4/yali4/gui/ScrGoodbye.py	(original)
+++ branches/yali4/yali4/gui/ScrGoodbye.py	Tue Apr  1 19:54:09 2008
@@ -35,7 +35,6 @@
 from yali4.gui.YaliDialog import WarningDialog
 from yali4.gui.YaliSteps import YaliSteps
 from yali4.gui.Ui.goodbyewidget import Ui_GoodByeWidget
-from yali4.constants import consts
 import yali4.gui.context as ctx
 
 ##
@@ -77,7 +76,6 @@
 
     def execute(self):
         ctx.mainScreen.disableNext()
-
         self.ui.info.show()
 
         try:
@@ -95,8 +93,8 @@
         self.dialog = WarningDialog(w, self)
         self.dialog.exec_()
 
-        ctx.debugger.log("Trying to eject the CD.")
         # remove cd...
+        ctx.debugger.log("Trying to eject the CD.")
         yali4.sysutils.eject_cdrom()
 
         ctx.debugger.log("Yali, fastreboot calling..")
@@ -110,14 +108,14 @@
 
     # process pending actions defined in other screens.
     def processPendingActions(self):
+        global bus
         bus = None
-
         def connectToDBus():
             global bus
             for i in range(20):
                 try:
                     ctx.debugger.log("trying to start dbus..")
-                    bus = dbus.bus.BusConnection(address_or_type=consts.dbus_socket_file)
+                    bus = dbus.bus.BusConnection(address_or_type=ctx.consts.dbus_socket_file)
                     break
                 except dbus.DBusException:
                     time.sleep(1)
@@ -129,7 +127,6 @@
         def setHostName():
             global bus
             obj = bus.get_object("tr.org.pardus.comar", "/package/baselayout")
-            # setHostName(hostname)
             obj.setHostName(ctx.installData.hostName, dbus_interface="tr.org.pardus.comar.Net.Stack")
             ctx.debugger.log("Hostname set as %s" % ctx.installData.hostName)
             return True
@@ -139,9 +136,7 @@
             obj = bus.get_object("tr.org.pardus.comar", "/package/baselayout")
             for u in yali4.users.pending_users:
                 ctx.debugger.log("User %s adding to system" % u.username)
-                # addUser(id, nick, realname, homedir, shell, passwd, groups)
                 obj.addUser("auto", u.username, u.realname, "", "", u.passwd, u.groups, dbus_interface="tr.org.pardus.comar.User.Manager")
-                #ctx.debugger.log("RESULT :: %s" % str(comarLink.read_cmd()))
 
                 # Enable auto-login
                 if u.username == ctx.installData.autoLoginUser:
@@ -152,9 +147,7 @@
             if not ctx.installData.useYaliFirstBoot:
                 global bus
                 obj = bus.get_object("tr.org.pardus.comar", "/package/baselayout")
-                # setUser(uid, realname, homedir, shell, passwd, groups)
                 obj.setUser(0, "", "", "", ctx.installData.rootPassword, "", dbus_interface="tr.org.pardus.comar.User.Manager")
-                #ctx.debugger.log("RESULT :: %s" % str(comarLink.read_cmd()))
             return True
 
         def writeConsoleData():
@@ -171,17 +164,13 @@
             global bus
             if yali4.sysutils.checkYaliParams(param=ctx.consts.firstBootParam):
                 ctx.debugger.log("OemInstall selected.")
-                # kdebase off
                 obj = bus.get_object("tr.org.pardus.comar", "/package/kdebase")
                 obj.setState("off", dbus_interface="tr.org.pardus.comar.System.Service")
-                #ctx.debugger.log("RESULT :: %s" % str(comarLink.read_cmd()))
-                # yali on
                 obj = bus.get_object("tr.org.pardus.comar", "/package/yali_firstBoot")
                 obj.setState("on", dbus_interface="tr.org.pardus.comar.System.Service")
-                #ctx.debugger.log("RESULT :: %s" % str(comarLink.read_cmd()))
             return True
 
-        steps = [{"text":"Trying to connect COMAR Daemon...","operation":connectToComar},
+        steps = [{"text":"Trying to connect DBUS...","operation":connectToDBus},
                  {"text":"Setting Hostname...","operation":setHostName},
                  {"text":"Setting TimeZone...","operation":yali4.postinstall.setTimeZone},
                  {"text":"Setting Root Password...","operation":setRootPassword},

Modified: branches/yali4/yali4/gui/context.py
=================================================================
--- branches/yali4/yali4/gui/context.py	(original)
+++ branches/yali4/yali4/gui/context.py	Tue Apr  1 19:54:09 2008
@@ -33,9 +33,6 @@
 # install data
 installData = installdata.InstallData()
 
-# icon factory
-# iconfactory = yali.gui.iconfactory.IconFactory(consts.pics_dir)
-
 # auto partitioning
 use_autopart = False
 

Modified: branches/yali4/yali4/gui/debugger.py
=================================================================
--- branches/yali4/yali4/gui/debugger.py	(original)
+++ branches/yali4/yali4/gui/debugger.py	Tue Apr  1 19:54:09 2008
@@ -69,7 +69,7 @@
 class DebugContainer(QtGui.QTextBrowser):
     def __init__(self, parent, showTimeStamp=True, sysoutEnabled=True):
         QtGui.QTextBrowser.__init__(self, parent)
-        self.setStyleSheet("font-size:8pt;font-family:\"Envy Code R\";")
+        self.setStyleSheet("font-size:8pt;")
         self.sysout = "/var/log/yali"
         self.showTimeStamp = showTimeStamp
         self.sysoutEnabled = sysoutEnabled

Modified: branches/yali4/yali4/partitiontype.py
=================================================================
--- branches/yali4/yali4/partitiontype.py	(original)
+++ branches/yali4/yali4/partitiontype.py	Tue Apr  1 19:54:09 2008
@@ -21,9 +21,7 @@
 import yali4.filesystem
 
 class PartitionType:
-
     filesystem = None
-
     ##
     # is equal
     # @param rhs: PartitionType
@@ -35,7 +33,6 @@
 ##
 # not an intuitive name but need group home and root :(
 class __PartitionType(PartitionType):
-
     def __init__(self):
         # check cmdline for reiserfs support
         cmdline = open("/proc/cmdline", "r").read()
@@ -46,7 +43,6 @@
         else:
             self.filesystem = yali4.filesystem.Ext3FileSystem()
 
-
 class RootPartitionType(__PartitionType):
     name = _("Install Root")
     mountpoint = "/"
@@ -55,7 +51,6 @@
     parted_flags = [ parted.PARTITION_BOOT ]
     label = "PARDUS_ROOT"
 
-
 class HomePartitionType(__PartitionType):
     name = _("Users' Files")
     mountpoint = "/home"
@@ -64,7 +59,6 @@
     parted_flags = []
     label = "PARDUS_HOME"
 
-
 class SwapPartitionType(PartitionType):
     name = _("Swap")
     filesystem = yali4.filesystem.SwapFileSystem()

Modified: branches/yali4/yali4/pisiiface.py
=================================================================
--- branches/yali4/yali4/pisiiface.py	(original)
+++ branches/yali4/yali4/pisiiface.py	Tue Apr  1 19:54:09 2008
@@ -38,7 +38,7 @@
     pisi.api.set_userinterface(ui)
     pisi.api.set_options(options)
     pisi.api.set_comar(with_comar)
-    pisi.api.set_signalhandling(False)
+    pisi.api.set_signal_handling(False)
 
 def add_repo(name, uri):
     pisi.api.add_repo(name, uri)


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi