summarylogtreecommitdiffstats
path: root/remove-ubuntu-version-check.patch
blob: 1b16ccde2a290530a11e717bfbc7a1d5ba529247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff -Naur usb-creator-0.2.59.orig/usbcreator/install.py usb-creator-0.2.59/usbcreator/install.py
--- usb-creator-0.2.59.orig/usbcreator/install.py	2013-12-02 21:03:23.000000000 +0100
+++ usb-creator-0.2.59/usbcreator/install.py	2014-07-23 18:04:25.636786909 +0200
@@ -198,31 +198,8 @@
         if os.path.exists(ldlinux):
             os.remove(ldlinux)
 
-    def os_vers(self):
-        """Return a tuple of the target OS version and our OS version."""
-        import lsb_release
-        try:
-            from debian import debian_support
-        except ImportError:
-            from debian_bundle import debian_support
-
-        target_os_ver = None
-        our_os_ver = debian_support.Version(
-            lsb_release.get_distro_information()['RELEASE'])
-
-        if os.path.exists(os.path.join(self.target, '.disk', 'info')):
-            with open(os.path.join(self.target, '.disk', 'info'),'r') as f:
-                contents = f.readline().split()
-            if len(contents) > 2:
-                # Consider point releases the same as the initial release
-                # (10.04.4 -> 10.04)
-                target_os_ver = debian_support.Version(contents[1])
-
-        return target_os_ver, our_os_ver
-
     def need_syslinux_legacy(self):
-        target_os_ver, our_os_ver = self.os_vers()
-        return our_os_ver >= '10.10' and target_os_ver <= '10.04'
+        return False
 
     def install_bootloader(self, grub_location=''):
         logging.debug('install_bootloader')
@@ -280,7 +257,6 @@
             if os.path.basename(filename) == 'gfxboot.cfg':
                 continue
             f = None
-            target_os_ver, our_os_ver = self.os_vers()
             try:
                 f = open(filename, 'r')
                 label = ''
@@ -298,16 +274,6 @@
                                 line.insert(1, 'cdrom-detect/try-usb=true')
                             if label not in ('memtest', 'hd'):
                                 line.insert(1, 'noprompt')
-                        #OS version specific mangles
-                        #The syntax in syslinux changed with the version
-                        #shipping in Ubuntu 10.10
-                        elif (target_os_ver and our_os_ver and
-                              target_os_ver != our_os_ver):
-                            #10.10 or newer image, burning on 10.04 or lower
-                            if (command.lower() == 'ui' and
-                                our_os_ver <= '10.04' and
-                                target_os_ver >= '10.10'):
-                                line.remove('ui')
 
                     to_write.append(' '.join(line) + '\n')
                 f.close()