install

installer
Log | Files | Refs | README | LICENSE | git clone https://git.ne02ptzero.me/git/install

commit c30269222c62b4af5b623ba3692d0e23849a740a
parent ca4578e955de0ad20b437c85c9b530c5f7816daa
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 13 Dec 2016 19:39:27 +0100

Add(Phase 2): Add phase_2 function:

Not tested.

Diffstat:
Mpkgs/linux_headers_p2/linux_headers_p2.py | 5+++--
Mscreens/install/install.py | 22++++++++++++++++++++++
2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/pkgs/linux_headers_p2/linux_headers_p2.py b/pkgs/linux_headers_p2/linux_headers_p2.py @@ -33,12 +33,13 @@ class Linux_Headers_P2: self.e = ex self.root_dir = root_dir self.config = { - "name": "linux", # Name of the package + "name": "linux-headers", # Name of the package "version": "4.7.2", # Version of the package "size": 666, # Size of the installed package (MB) "archive": "linux-4.7.2.tar.xz", # Archive name "SBU": 0.1, # SBU (Compilation time) - "next": "glibc", # Next package to install + "next": False, # Next package to install + "tmp_install": False, "configure": False, "make": False, "urls": [ # Url to download the package. The first one must be morphux servers diff --git a/screens/install/install.py b/screens/install/install.py @@ -118,6 +118,7 @@ class Install: self.copy_files(self.mnt_point) self.chroot() self.links() + self.phase_2_install() self.dlg.msgbox("The installation is finished. Hit 'Enter' to close this dialog and reboot.", title="Success !") # Need reboot here @@ -310,6 +311,27 @@ class Install: self.install(pkg_phase_1, "binutils") self.in_install = 0 + # This function launch the phase-2 full installation + def phase_2_install(self): + pkg_phase_2 = {} + total_size = 0 + total_sbus = 0 + + # Look for phase 2 package + for name, pkg in self.pkgs.items(): + if pkgs[1]["tmp_install"] == False: + total_size += pkg[1]["size"] + total_sbus += pkg[1]["SBU"] + pkg_phase_2[name] = pkg + + # Download the required archives + self.pkg_download(pkg_phase_2) + + self.inst_title = "Phase 2: Installation" + self.in_install = 1 + self.install(pkg_phase_2, "linux-headers") + self.in_install = 0 + # This function take an object of packages, check if the sources are there. # If they aren't, the function download them. def pkg_download(self, pkg_list, untar=True):