]> git.ipfire.org Git - people/shoehn/ipfire.org.git/commitdiff
webapp: Prepare for x86_64
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Apr 2016 19:22:56 +0000 (21:22 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Apr 2016 19:22:56 +0000 (21:22 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
webapp/backend/releases.py
webapp/ui_modules.py

index 48f7b5d25c7645a40a54dfb0037e67fb883c8b80..6c556114187d5a91ff9a0fdb01d8a9331b3c02aa 100644 (file)
@@ -168,7 +168,7 @@ class File(Object):
 
        @property
        def arch(self):
-               known_arches = ("i586", "arm")
+               known_arches = ("x86_64", "i586", "arm")
 
                for arch in known_arches:
                        if arch in self.basename:
@@ -366,11 +366,7 @@ class Release(Object):
                                f.close()
 
        def supports_arch(self, arch):
-               # Currently there is nothing else than i586 supported
-               if arch == "i586":
-                       return True
-
-               return False
+               return arch in ("x86_64", "i586")
 
        def supports_platform(self, platform):
                # Currently there is nothing else than pcbios supported
@@ -386,12 +382,18 @@ class Release(Object):
                assert self.supports_arch(arch)
                assert self.supports_platform(platform)
 
+               if self.sname >= "ipfire-2.19-core100":
+                       return "http://downloads.ipfire.org/%s/images/%s/vmlinuz" % (self.path, arch)
+
                return "http://downloads.ipfire.org/%s/images/vmlinuz" % self.path
 
        def netboot_initrd_url(self, arch, platform):
                assert self.supports_arch(arch)
                assert self.supports_platform(platform)
 
+               if self.sname >= "ipfire-2.19-core100":
+                       return "http://downloads.ipfire.org/%s/images/%s/instroot" % (self.path, arch)
+
                return "http://downloads.ipfire.org/%s/images/instroot" % self.path
 
        def netboot_args(self, arch, platform):
index 514688fa3e1a513a686b18fe46f8a8881615b523..d70d1324cfba96ec65437d0cb631a7235e994032 100644 (file)
@@ -264,10 +264,10 @@ class SidebarReleaseModule(UIModule):
 
 class ReleaseItemModule(UIModule):
        def render(self, release, latest=False):
-               arches = ("i586", "arm")
+               arches = ("x86_64", "i586", "arm")
 
                downloads = []
-               for arch in ("i586", "arm"):
+               for arch in arches:
                        files = []
 
                        for file in release.files:
@@ -296,7 +296,8 @@ class DownloadButtonModule(UIModule):
                best_image = None
 
                for file in release.files:
-                       if file.type == "iso":
+                       if (release.sname < "ipfire-2.19-core100" or file.arch == "x86_64") \
+                                       and file.type == "iso":
                                best_image = file
                                break