~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to debian/patches/9004_ubuntu_correct_tree.patch

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2011-06-27 15:09:10 UTC
  • Revision ID: james.westby@ubuntu.com-20110627150910-e2u027imopi4bw14
Tags: 0.500.6-1ubuntu2
debian/patches/9004_ubuntu_correct_tree.patch: Update to correctly detect
HTTP sources for different types of ISO's and archs (Including mini ISO).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
Author: Andres Rodriguez <andreserl@ubuntu.com>
7
7
Bug-Ubuntu: https://bugs.launchpad.net/bugs/751979
8
8
 
9
 
Index: virtinst-0.500.5/virtinst/OSDistro.py
 
9
Index: virtinst-0.500.6/virtinst/OSDistro.py
10
10
===================================================================
11
 
--- virtinst-0.500.5.orig/virtinst/OSDistro.py  2011-04-08 13:32:09.386817994 -0400
12
 
+++ virtinst-0.500.5/virtinst/OSDistro.py       2011-04-08 13:38:01.957335095 -0400
13
 
@@ -956,12 +956,21 @@
 
11
--- virtinst-0.500.6.orig/virtinst/OSDistro.py  2011-06-27 12:19:17.313023349 -0400
 
12
+++ virtinst-0.500.6/virtinst/OSDistro.py       2011-06-27 12:27:38.333758191 -0400
 
13
@@ -946,8 +946,11 @@
 
14
 
 
15
     def _set_media_paths(self):
 
16
         DebianDistro._set_media_paths(self)
 
17
-        root = "%s/netboot/ubuntu-installer/%s/" % (self._prefix,
 
18
-                                                    self._treeArch)
 
19
+        if self._prefix:
 
20
+            root = "%s/netboot/ubuntu-installer/%s/" % (self._prefix,
 
21
+                                                        self._treeArch)
 
22
+        else:
 
23
+            root = ""
 
24
         self._hvm_kernel_paths = [ (root + "linux", root + "initrd.gz") ]
 
25
         self._xen_kernel_paths = []
 
26
 
 
27
@@ -957,12 +960,32 @@
14
28
             return False
15
29
 
16
30
         # For regular trees
20
34
+            regex = ".*ubuntu-installer.*"
21
35
+        elif fetcher.hasFile("install/netboot/version.info"):
22
36
+            self._prefix = "install"
 
37
+            if fetcher.hasFile("install/netboot/ubuntu-installer/i386"):
 
38
+                self._treeArch = "i386"
 
39
+            elif fetcher.hasFile("install/netboot/ubuntu-installer/amd64"):
 
40
+                self._treeArch = "amd64"
23
41
+            self._set_media_paths()
24
42
+            filename = "%s/netboot/version.info" % self._prefix
25
43
+            regex = "Ubuntu*"
 
44
+        elif fetcher.hasFile("initrd.gz") and fetcher.hasFile("linux"):
 
45
+            self._prefix = ""
 
46
+            if fetcher.hasFile("boot/grub/x86_64-efi"):
 
47
+                self._treeArch = "amd64"
 
48
+            self._set_media_paths()
 
49
+            filename = "f10.txt"
 
50
+            regex = "Ubuntu*"
26
51
+        else:
27
52
+            logging.debug("Doesn't look like an Ubuntu Distro.")
28
53
             return False