Merge lp:~smartboyhw/wubi/bug-1080090 into lp:wubi

Proposed by Howard Chan on 2012-11-17
Status: Merged
Approved by: Colin Watson on 2012-11-19
Approved revision: 276
Merged at revision: 276
Proposed branch: lp:~smartboyhw/wubi/bug-1080090
Merge into: lp:wubi
Diff against target: 35 lines (+7/-2)
2 files modified
debian/changelog (+5/-1)
src/wubi/backends/common/distro.py (+2/-1)
To merge this branch: bzr merge lp:~smartboyhw/wubi/bug-1080090
Reviewer Review Type Date Requested Status
Colin Watson 2012-11-17 Approve on 2012-11-19
Review via email: mp+134776@code.launchpad.net

Commit Message

Changed code in distro.py to not replace hyphens with spaces (LP: #1080090)

Description of the Change

== Background ==

bcbc reported that when he tries out the code to install Ubuntu Studio into Wubi, he received a dialog telling him that it still didn't match the data in /.disk/info. However I checked the name in isolist.ini and it is correct. So I decided to report a bug (LP: #1080090) to track the bug/problem.

== Issues ==
It turns out in /src/wubi/backend/common/distro.py line 191
name = info.group('name').replace("-", " ")
that it replaces hyphens with spaces.
The original correct name "Ubuntu-Studio" turns into "Ubuntu Studio", which then does not fit the data in .disk/info

== Changed code ==

I went to delete the .replace("-", " ") and also added the example of Ubuntu-Studio ISO .disk/info into it so that people know why I changed the code to not replace hyphens with spaces.

BTW this code doesn't affect other distros, since that only our distro has two words in our distro name.

To post a comment you must log in.
Colin Watson (cjwatson) wrote :

OK, but on the understanding that this is a temporary hack and that it should be reverted as soon as the underlying problems are fixed. I'll add a comment to that effect.

review: Approve

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-11-16 14:31:12 +0000
3+++ debian/changelog 2012-11-17 15:01:19 +0000
4@@ -6,7 +6,11 @@
5 [ Colin Watson ]
6 * Bump to 13.04.
7
8- -- Howard Chan <smartboyhw@gmail.com> Thu, 15 Nov 2012 19:48:09 +0800
9+ [ Howard Chan ]
10+ * Changed code in /src/wubi/backends/common/distro.py to make Wubi not
11+ replacing the correct distro name with the wrong one (LP: #1080090)
12+
13+ -- Howard Chan <smartboyhw@gmail.com> Sat, 17 Nov 2012 22:48:01 +0800
14
15 wubi (12.10) quantal; urgency=low
16
17
18=== modified file 'src/wubi/backends/common/distro.py'
19--- src/wubi/backends/common/distro.py 2012-04-24 15:57:38 +0000
20+++ src/wubi/backends/common/distro.py 2012-11-17 15:01:19 +0000
21@@ -182,12 +182,13 @@
22 Ubuntu 9.04 "Jaunty Jackalope" - Alpha i386 (20090106)
23 Ubuntu 9.04 "Jaunty Jackalope" - Alpha i386 (20090106.1)
24 Ubuntu Split Name 9.04.1 "Jaunty Jackalope" - Final Release i386 (20090106.2)
25+ Ubuntu-Studio 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
26 '''
27 log.debug(" parsing info from str=%s" % info)
28 if not info:
29 return
30 info = disk_info_re.match(info)
31- name = info.group('name').replace('-', ' ')
32+ name = info.group('name')
33 version = info.group('version')
34 subversion = info.group('subversion')
35 arch = info.group('arch')

Subscribers

People subscribed via source and target branches

to status/vote changes: