Merge lp:~bcbc/wubi/lp-882393 into lp:wubi

Proposed by bcbc
Status: Merged
Merged at revision: 260
Proposed branch: lp:~bcbc/wubi/lp-882393
Merge into: lp:wubi
Diff against target: 112 lines (+36/-10)
3 files modified
debian/changelog (+14/-0)
src/wubi/backends/common/backend.py (+4/-2)
src/wubi/backends/win32/backend.py (+18/-8)
To merge this branch: bzr merge lp:~bcbc/wubi/lp-882393
Reviewer Review Type Date Requested Status
Ubuntu Installer Team Pending
Review via email: mp+94646@code.launchpad.net

Description of the change

Don't use the diskimage download when the target partition is FAT32 (LP: #882392)

When the target drive is FAT32, don't use the diskimage download which fails. Instead download the desktop CD ISO. Tested by running standalone wubi.exe, first installing to an NTFS partition and it starts to download the tar.xz diskimage. When I select a FAT32 drive it instead downloads the desktop CD ISO.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-01 16:32:10 +0000
3+++ debian/changelog 2012-02-25 07:06:17 +0000
4@@ -1,5 +1,19 @@
5 wubi (12.04) UNRELEASED; urgency=low
6
7+ [ bcbc ]
8+ * Don't use the diskimage download when the target
9+ partition is FAT32 (LP: #882393).
10+
11+ [ bcbc ]
12+ * Correct NameError exceptions on missing attributes
13+ when running CD boot helper or a CD is rejected (LP: #876154).
14+ * Ignore Permission denied when copying wubildr everywhere
15+ (LP: #862003)
16+ * Don't fail if Windows' startup folder is missing or mis-
17+ configured (LP: #910948)
18+ * If bcdedit fails when uninstalling, it shouldn't be fatal
19+ (LP: #925779)
20+
21 [ Evan Dandrea ]
22 * Remove partially downloaded files that Windows does not consider
23 files when the bit torrent tracker falls over (LP: #873268).
24
25=== modified file 'src/wubi/backends/common/backend.py'
26--- src/wubi/backends/common/backend.py 2012-02-01 16:32:10 +0000
27+++ src/wubi/backends/common/backend.py 2012-02-25 07:06:17 +0000
28@@ -75,7 +75,8 @@
29 def get_installation_tasklist(self):
30 self.cache_cd_path()
31 dimage = self.info.distro.diskimage
32- if dimage and not self.cd_path and not self.iso_path:
33+ # don't use diskimage for a FAT32 target directory
34+ if dimage and not self.cd_path and not self.iso_path and not self.info.target_drive.is_fat():
35 tasks = [
36 Task(self.select_target_dir,
37 description=_("Selecting the target directory")),
38@@ -120,6 +121,7 @@
39 return tasklist
40
41 def get_cdboot_tasklist(self):
42+ self.cache_cd_path()
43 tasks = [
44 Task(self.select_target_dir, description=_("Selecting the target directory")),
45 Task(self.create_dir_structure, description=_("Creating the installation directories")),
46@@ -345,6 +347,7 @@
47 return urls
48
49 def cache_cd_path(self):
50+ self.iso_path = None
51 self.cd_path = None
52 if self.info.cd_distro \
53 and self.info.distro == self.info.cd_distro \
54@@ -355,7 +358,6 @@
55 self.cd_path = self.find_cd()
56
57 if not self.cd_path:
58- self.iso_path = None
59 if self.info.iso_distro \
60 and self.info.distro == self.info.iso_distro \
61 and os.path.isfile(self.info.iso_path):
62
63=== modified file 'src/wubi/backends/win32/backend.py'
64--- src/wubi/backends/win32/backend.py 2011-10-11 09:30:51 +0000
65+++ src/wubi/backends/win32/backend.py 2012-02-25 07:06:17 +0000
66@@ -160,7 +160,11 @@
67 shutil.copyfile(src, dest)
68
69 def remove_existing_binary(self):
70- binary = os.path.join(self.get_startup_folder(), 'wubi.exe')
71+ try:
72+ binary = os.path.join(self.get_startup_folder(), 'wubi.exe')
73+ except: # if the startup folder is missing, there is nothing to remove
74+ return
75+
76 if os.path.exists(binary):
77 try:
78 MOVEFILE_DELAY_UNTIL_REBOOT = 4
79@@ -478,7 +482,10 @@
80 if drive.type not in ('removable', 'hd'):
81 continue
82 dest = join_path(drive.path, 'wubildr')
83- shutil.copyfile(src, dest)
84+ try:
85+ shutil.copyfile(src, dest)
86+ except: # don't need to worry about failure here
87+ pass
88 os.unlink(src)
89
90 def get_usb_search_paths(self):
91@@ -741,12 +748,15 @@
92 return
93 log.debug("Removing bcd entry %s" % id)
94 command = [bcdedit, '/delete', id , '/f']
95- run_command(command)
96- registry.set_value(
97- 'HKEY_LOCAL_MACHINE',
98- self.info.registry_key,
99- 'VistaBootDrive',
100- "")
101+ try:
102+ run_command(command)
103+ registry.set_value(
104+ 'HKEY_LOCAL_MACHINE',
105+ self.info.registry_key,
106+ 'VistaBootDrive',
107+ "")
108+ except Exception, err: #this shouldn't be fatal
109+ log.error(err)
110
111 def get_arch(self):
112 cpuid = ctypes.windll.LoadLibrary(self.info.cpuid)

Subscribers

People subscribed via source and target branches

to status/vote changes: