wubi.exe for ubuntu 11.10 fails if the default startup folder doesn't exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Wubi |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
wubi.exe file in ubuntu-
wubi.exe from ubuntu-
---wubi-
01-03 01:09 INFO root: === wubi 11.10 rev241 ===
01-03 01:09 DEBUG root: Logfile is c:\users\
01-03 01:09 DEBUG root: sys.argv = ['main.pyo', '--exefile=
01-03 01:09 DEBUG CommonBackend: data_dir=
01-03 01:09 DEBUG WindowsBackend: 7z=C:\Users\
01-03 01:09 DEBUG WindowsBackend: startup_folder=None
01-03 01:09 ERROR root: unsubscriptable object
Traceback (most recent call last):
File "\lib\wubi\
File "\lib\wubi\
File "\lib\ntpath.py", line 90, in join
TypeError: unsubscriptable object
for only wubi.exe log result:
-----wubi-
01-03 01:13 INFO root: === wubi 11.10 rev245 ===
01-03 01:13 DEBUG root: Logfile is c:\users\
01-03 01:13 DEBUG root: sys.argv = ['main.pyo', '--exefile=
01-03 01:13 DEBUG CommonBackend: data_dir=
01-03 01:13 DEBUG WindowsBackend: 7z=C:\Users\
01-03 01:13 DEBUG WindowsBackend: startup_folder=None
01-03 01:13 ERROR root: unsubscriptable object
Traceback (most recent call last):
File "\lib\wubi\
File "\lib\wubi\
File "\lib\ntpath.py", line 90, in join
TypeError: unsubscriptable object
Related branches
- Ubuntu Installer Team: Pending requested
-
Diff: 98 lines (+30/-9)3 files modifieddebian/changelog (+10/-0)
src/wubi/backends/common/backend.py (+2/-1)
src/wubi/backends/win32/backend.py (+18/-8)
summary: |
- wubi.exe for ubuntu 11.10 isn't start in win7 32bit + wubi.exe for ubuntu 11.10 fails if the default startup folder doesn't + exist |
tags: | added: oneiric |
Changed in wubi: | |
status: | New → Fix Committed |
This looks like a bug caused by the attempt to remove "wubi.exe" from the startup folder. This logic was introduced in 11.04 I believe, which inserts wubi.exe in the startup folder if a user tries to do a normal dual boot but all four primary partitions are used.
The problem is that the startup folder is not set. It looks like ntpath.py should handle this, but it probably isn't. The workaround is likely to set the startup environment variable by editing the registry (regedit) and setting:
'HKEY_ LOCAL_MACHINE' , 'SOFTWARE\ Microsoft\ Windows\ CurrentVersion'
'\Explorer\ Shell Folders',
'Common Startup'
Relevant code: backends\ win32\backend. py
\lib\wubi\
def remove_ existing_ binary( self): join(self. get_startup_ folder( ), 'wubi.exe') exists( binary) :
MOVEFILE_ DELAY_UNTIL_ REBOOT = 4
ctypes. windll. kernel32. MoveFileExW( binary, None,
MOVEFILE_ DELAY_UNTIL_ REBOOT)
log.exception ("Couldn' t remove Wubi from startup:")
binary = os.path.
if os.path.
try:
except (OSError, IOError):
============
\lib\wubi\ backends\ win32\backend. py
def join(a, *p):
"""Join two or more pathname components, inserting "\\" as needed"""
path = a
for b in p:
b_wins = 0 # set to 1 iff b makes path irrelevant
if path == "":
b_wins = 1
elif isabs(b):
b_wins = 1
# This probably wipes out path so far. However, it's more
# complicated if path begins with a drive letter:
# 1. join('c:', '/a') == 'c:/a'
# 2. join('c:/', '/a') == 'c:/a'
# But
# 3. join('c:/a', '/b') == '/b'
# 4. join('c:', 'd:/') = 'd:/'
# 5. join('c:/', 'd:/') = 'd:/'
if path[1:2] != ":" or b[1:2] == ":":
# Path doesn't start with a drive letter, or cases 4 and 5.
# Else path has a drive letter, and b doesn't but is absolute.
path[-1] not in "/\\"):
b_wins = 1
elif len(path) > 3 or (len(path) == 3 and
# case 3
if b_wins:
path = b
else:
# Join, and ensure there's a separator.
assert len(path) > 0
if path[-1] in "/\\": <== line 90, should never get here