The branch, dharma-pre has been updated
       via  4bc39439b7582faa9a54675baecfd3de99bcaff8 (commit)
      from  e8cace4f71207195f342088043a5b98da23f2e3f (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=4bc39439b7582faa9a54675baecfd3de99bcaff8

commit 4bc39439b7582faa9a54675baecfd3de99bcaff8
Author: Zeljko Ametovic <[email protected]>
Date:   Thu Nov 18 13:42:23 2010 +0400

    [script.bootable.disk.wizard] -v 0.9.8
    
    -  improved disk partitioning and formatting

diff --git a/script.bootable.disk.wizard/addon.xml 
b/script.bootable.disk.wizard/addon.xml
index ff6d328..0ef261b 100644
--- a/script.bootable.disk.wizard/addon.xml
+++ b/script.bootable.disk.wizard/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.bootable.disk.wizard"
        name="Bootable Disk Wizard"
-       version="0.9.7"
+       version="0.9.8"
        provider-name="Team XBMC">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/script.bootable.disk.wizard/resources/lib/wizardCore.py 
b/script.bootable.disk.wizard/resources/lib/wizardCore.py
index e70cccc..ce6011a 100644
--- a/script.bootable.disk.wizard/resources/lib/wizardCore.py
+++ b/script.bootable.disk.wizard/resources/lib/wizardCore.py
@@ -241,16 +241,31 @@ class WizardCore:
 
                self.__runSilent("sync")
 
-               # XBMC in standalone mode may mount the newly created partition
-               # I wish there could be a way to temporaily inhibit automounting
-               aCmd = self.udev_helper + " --mount " + targetDevice + "1"
-               stdErr, stdOut, retValue = self.__runSilent(aCmd)
+               #
+               # Wait until XBMC mounts the newly created volume
+               #
+               for sec in range(1, 10):
+                       time.sleep(1)
+                       self.__printDebugLine("Waiting for disk to be mounted 
(" + str(sec) + ") ...")
+
+                       aCmd = "mount | grep " + targetDevice + "1"
+                       stdErr, stdOut, retValue = self.__runSilent(aCmd)
+                       if retValue==0:
+                           break
+
+               if retValue!=0:
+                       #
+                       # disk not mounted yet, let's mount it ourself
+                       #
+                       aCmd = udev_helper + " --mount " + targetDevice + "1"
+                       stdErr, stdOut, retValue = self.__runSilent(aCmd)
+                       aCmd = "mount | grep " + targetDevice + "1"
+                       stdErr, stdOut, retValue = self.__runSilent(aCmd)
 
-               aCmd = "mount | grep " + targetDevice + "1"
-               stdErr, stdOut, retValue = self.__runSilent(aCmd)
                if retValue==0:
-                       # TODO make it locale-indipendent
-                       mountPoint = stdOut[stdOut.find("on") + 
3:stdOut.find("type") - 1]
+                       # Note: we have no spaces in the label
+                       # /dev/sdb1 on /media/XBMCLive_xx type vfat ...'
+                       mountPoint = stdOut.split(" ")[2]
                else:
                        raise RuntimeError("99")
 
@@ -375,6 +390,12 @@ class WizardCore:
                        self.__printDebugLine("Error formatting: " + stdOut)
                        return False
 
+               aCmd = 'echo "' + aPassword + '" | sudo -S partprobe ' + aDevice
+               stdErr, stdOut, retValue = self.__runSilent(aCmd)
+               if retValue >0:
+                       self.__printDebugLine("Error partitioning (9): " + 
stdOut)
+                       return False
+
                return True
 
        def __copyFiles(self, srcDirectory, dstDirectory, percStart, percEnd):
@@ -447,10 +468,7 @@ class WizardCore:
                                except:
                                        self.__printDebugLine("Error copying 
file: " + file + " - check your media")
                                        result = False
-                                       continue
-
-               if not os.path.exists(dstDirectory + "/" + "Hooks"):
-                       os.mkdir(dstDirectory + "/" + "Hooks")
+                                       return result
 
                return result
 

-----------------------------------------------------------------------

Summary of changes:
 script.bootable.disk.wizard/addon.xml              |    2 +-
 .../resources/lib/wizardCore.py                    |   42 ++++++++++++++------
 2 files changed, 31 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to