diff --git a/setup/installer/__init__.py b/setup/installer/__init__.py index e31e018f43..60946935e3 100644 --- a/setup/installer/__init__.py +++ b/setup/installer/__init__.py @@ -6,7 +6,7 @@ __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import subprocess, tempfile, os, time, socket +import subprocess, tempfile, os, time from setup import Command, installer_name from setup.build_environment import HOST, PROJECT @@ -57,23 +57,25 @@ class Push(Command): def run(self, opts): from threading import Thread - threads = [] + threads = {} for host, vmname in { r'Owner@winxp:/cygdrive/c/Documents\ and\ Settings/Owner/calibre':'winxp', 'kovid@ox:calibre':None, r'kovid@win7:/cygdrive/c/Users/kovid/calibre':'Windows 7', - 'kovid@getafix:calibre-src':None, + 'kovid@win7-64:calibre-src':None, }.iteritems(): - if '@getafix:' in host and socket.gethostname() == 'getafix': - continue if vmname is None or is_vm_running(vmname): rcmd = BASE_RSYNC + EXCLUDES + ['.', host] print '\n\nPushing to:', vmname or host, '\n' - threads.append(Thread(target=subprocess.check_call, args=(rcmd,), - kwargs={'stdout':open(os.devnull, 'wb')})) - threads[-1].start() - for thread in threads: - thread.join() + threads[vmname or host] = thread = Thread(target=subprocess.check_call, args=(rcmd,), + kwargs={'stdout':open(os.devnull, 'wb')}) + thread.start() + while threads: + for name, thread in tuple(threads.iteritems()): + thread.join(0.01) + if not thread.is_alive(): + print '\n\n', name, 'done' + threads.pop(name) class VMInstaller(Command): diff --git a/setup/installer/windows/notes.rst b/setup/installer/windows/notes.rst index 297279a8b2..b58c564f84 100644 --- a/setup/installer/windows/notes.rst +++ b/setup/installer/windows/notes.rst @@ -69,7 +69,8 @@ to login as the normal user account with ssh. To do this, follow these steps: rm -R /etc/ssh* mkpasswd -cl > /etc/passwd mkgroup --local > /etc/group - * Assign the necessary rights to the normal user account:: + * Assign the necessary rights to the normal user account (administrator + command prompt needed):: editrights.exe -a SeAssignPrimaryTokenPrivilege -u kovid editrights.exe -a SeCreateTokenPrivilege -u kovid editrights.exe -a SeTcbPrivilege -u kovid