if f:
f.close()
+ def supports_arch(self, arch):
+ # Currently there is nothing else than i586 supported
+ if arch == "i586":
+ return True
+
+ return False
+
+ def supports_platform(self, platform):
+ # Currently there is nothing else than pcbios supported
+ if platform == "pcbios":
+ return True
+
+ return False
+
def is_netboot_capable(self):
return self.path and "ipfire-2.x" in self.path
- @property
- def netboot_kernel(self):
+ def netboot_kernel_url(self, arch, platform):
+ assert self.supports_arch(arch)
+ assert self.supports_platform(platform)
+
return "http://downloads.ipfire.org/%s/images/vmlinuz" % self.path
- @property
- def netboot_initrd(self):
+ def netboot_initrd_url(self, arch, platform):
+ assert self.supports_arch(arch)
+ assert self.supports_platform(platform)
+
return "http://downloads.ipfire.org/%s/images/instroot" % self.path
+ def netboot_args(self, arch, platform):
+ return ""
+
@property
def news_id(self):
return self.__data.news_id
if ret:
return Release(self.backend, ret.id, data=ret)
+ def get_by_news_id(self, news_id):
+ ret = self.db.get("SELECT * FROM releases WHERE news_id = %s", news_id)
+
+ if ret:
+ return Release(self.backend, ret.id, data=ret)
+
def get_latest(self, stable=True):
ret = self.db.get("SELECT * FROM releases WHERE published IS NOT NULL AND published <= NOW() \
AND stable = %s ORDER BY published DESC LIMIT 1", stable)