[Uludag-commits] r17614 - in branches/yali4/yali4: . gui
uludag-commits at pardus.org.tr
uludag-commits at pardus.org.tr
10 Nis 2008 Per 13:47:53 EEST
Author: gokmen.goksel
Date: Thu Apr 10 13:47:52 2008
New Revision: 17614
Modified:
branches/yali4/yali4/bootloader.py
branches/yali4/yali4/gui/ScrBootloader.py
branches/yali4/yali4/gui/ScrGoodbye.py
branches/yali4/yali4/gui/runner.py
Log:
* Windows Partitions GRUB issues Fixed .
Modified: branches/yali4/yali4/bootloader.py
=================================================================
--- branches/yali4/yali4/bootloader.py (original)
+++ branches/yali4/yali4/bootloader.py Thu Apr 10 13:47:52 2008
@@ -182,10 +182,18 @@
minor = str(int(filter(lambda u: u.isdigit(), win_root)) -1)
grub_root = ",".join([grub_dev, minor])
+ ctx.debugger.log("GCAW : win_dev : %s , win_root : %s " % (win_dev, win_root))
+ ctx.debugger.log("GCAW : grub_dev: %s , grub_root: %s " % (grub_dev, grub_root))
+ ctx.debugger.log("GCAW : install_dev: %s " % install_dev)
+
if not install_dev:
install_dev = self._find_hd0()
+ ctx.debugger.log("GCAW :2install_dev: %s " % install_dev)
+
dev_str = str(os.path.basename(install_dev))
+ ctx.debugger.log("GCAW : dev_str: %s " % dev_str)
+
if win_dev == dev_str:
s = win_part_tmp % {"title": _("Windows"),
"grub_root": grub_root,
@@ -196,6 +204,7 @@
"grub_root": grub_root,
"root": win_root,
"fs": win_fs}
+
open(self.grub_conf, "a").write(s)
def install_grub(self, grub_install_root=None):
@@ -204,11 +213,15 @@
if not grub_install_root.startswith("/dev/"):
grub_install_root = "/dev/%s" % grub_install_root
- grub_install_root = str(filter(lambda u: not u.isdigit(),
- grub_install_root))
-
cmd = "%s --root-directory=%s %s --no-floppy" % (yali4.sysutils.find_executable("grub-install"),
consts.target_dir,
grub_install_root)
+
+ ctx.debugger.log("IG : cmd: %s " % cmd)
+
if os.system(cmd) != 0:
raise YaliException, "Command failed: %s" % cmd
+ else:
+ return True
+ return False
+
Modified: branches/yali4/yali4/gui/ScrBootloader.py
=================================================================
--- branches/yali4/yali4/gui/ScrBootloader.py (original)
+++ branches/yali4/yali4/gui/ScrBootloader.py Thu Apr 10 13:47:52 2008
@@ -130,6 +130,7 @@
# first delete partitions on device
dev.deleteAllPartitions()
dev.commit()
+
ctx.mainScreen.processEvents()
p = dev.addPartition(None,
@@ -239,7 +240,8 @@
if len(yali4.storage.devices) > 1:
ctx.installData.bootLoaderDev = basename(ctx.installData.orderedDiskList[0])
else:
- ctx.installData.bootLoaderDev = str(basename(root_part_req.partition().getPath()))
+ ctx.installData.bootLoaderDev = str(filter(lambda u: not u.isdigit(),
+ basename(root_part_req.partition().getPath())))
_ins_part = root_part_req.partition().getPath()
Modified: branches/yali4/yali4/gui/ScrGoodbye.py
=================================================================
--- branches/yali4/yali4/gui/ScrGoodbye.py (original)
+++ branches/yali4/yali4/gui/ScrGoodbye.py Thu Apr 10 13:47:52 2008
@@ -92,6 +92,7 @@
ctx.debugger.log("Show reboot dialog.")
self.dialog = WarningDialog(w, self)
self.dialog.exec_()
+ ctx.mainScreen.processEvents()
# remove cd...
ctx.debugger.log("Trying to eject the CD.")
@@ -103,6 +104,7 @@
if ctx.debugEnabled:
open(ctx.consts.log_file,"w").write(str(ctx.debugger.traceback.plainLogs))
+ ctx.mainScreen.processEvents()
time.sleep(4)
yali4.sysutils.fastreboot()
@@ -186,7 +188,6 @@
ctx.debugger.log("Dont install bootloader selected; skipping.")
return
- ctx.debugger.log("Bootloader is installing...")
loader = yali4.bootloader.BootLoader()
root_part_req = ctx.partrequests.searchPartTypeAndReqType(parttype.root,
partrequest.mountRequestType)
@@ -194,11 +195,13 @@
loader.write_grub_conf(_ins_part,ctx.installData.bootLoaderDev)
# Check for windows partitions.
+ ctx.debugger.log("Checking for Windows ...")
for d in yali4.storage.devices:
for p in d.getPartitions():
fs = p.getFSName()
if fs in ("ntfs", "fat32"):
if is_windows_boot(p.getPath(), fs):
+ ctx.debugger.log("Windows Found on device %s partition %s " % (p.getDevicePath(), p.getPath()))
win_fs = fs
win_dev = basename(p.getDevicePath())
win_root = basename(p.getPath())
@@ -209,8 +212,7 @@
continue
# finally install it
- loader.install_grub(ctx.installData.bootLoaderDev)
- ctx.debugger.log("Bootloader installed.")
+ return loader.install_grub(ctx.installData.bootLoaderDev)
class RebootWidget(QtGui.QWidget):
Modified: branches/yali4/yali4/gui/runner.py
=================================================================
--- branches/yali4/yali4/gui/runner.py (original)
+++ branches/yali4/yali4/gui/runner.py Thu Apr 10 13:47:52 2008
@@ -74,8 +74,9 @@
if yali4.sysutils.checkYaliParams(param=ctx.consts.firstBootParam):
ctx.options.kahyaFile = ctx.consts.firstBootFile
- # font = QtGui.QFont()
- # font.setFamily("Droid Sans")
+ # font = QtGui.QFont()
+ # font.setFamily("Droid Sans")
+ # font.setPixelSize(11)
# self._app.setFont(font)
ctx.mainScreen = self._window
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi