install

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

commit 5f729840c8751ad4a9e146cb8662631638509a09
parent 97f06d64b9bcec4a0c291ef17c778eee43225964
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed, 14 Dec 2016 19:23:29 +0100

Add(Toolchain 'Package'):

The installer now supporting package without archive

Diffstat:
Mpkgs/glibc_p2/glibc_p2.py | 2+-
Apkgs/toolchain_p2/__init__.py | 0
Apkgs/toolchain_p2/toolchain_p2.py | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mscreens/install/install.py | 8+++++++-
4 files changed, 63 insertions(+), 2 deletions(-)

diff --git a/pkgs/glibc_p2/glibc_p2.py b/pkgs/glibc_p2/glibc_p2.py @@ -39,7 +39,7 @@ class Glibc_P2: "archive": "glibc-2.24.tar.xz", # Archive name "SBU": 17, # SBU (Compilation time) "tmp_install": False, # Is this package part of the temporary install - "next": "libstdcpp", # Next package to install + "next": "toolchain", # Next package to install "urls": [ # Url to download the package. The first one must be morphux servers "https://install.morphux.org/packages/glibc-2.24.tar.xz" ] diff --git a/pkgs/toolchain_p2/__init__.py b/pkgs/toolchain_p2/__init__.py diff --git a/pkgs/toolchain_p2/toolchain_p2.py b/pkgs/toolchain_p2/toolchain_p2.py @@ -0,0 +1,55 @@ +################################### LICENSE #################################### +# Copyright 2016 Morphux # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +## +# toolchain_p2.py +# Created: 14/12/2016 +# By: Louis Solofrizzo <louis@morphux.org> +## + +import os + +class Toolchain_P2: + + conf_lst = {} + e = False + root_dir = "" + + def init(self, c_lst, ex, root_dir): + self.conf_lst = c_lst + self.e = ex + self.root_dir = root_dir + self.config = { + "name": "toolchain", # Name of the package + "version": "0", # Version of the package + "size": 0, # Size of the installed package (MB) + "archive": False, # Archive name + "SBU": 0, # SBU (Compilation time) + "tmp_install": False, # Is this package part of the temporary install + "next": False, # Next package to install + "urls": False, + "configure": False, + "make": False, + "install": False, + "after": False + } + return self.config + + def before(self): + self.e(["mv", "-v", "/tools/bin/ld", "/tools/bin/ld-old"]) + self.e(["mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}"], shell=True) + self.e(["mv", "-v", "/tools/bin/{ld-new,ld}"], shell=True) + return self.e(["ln", "-sv", "/tools/bin/ld", "/tools/$(uname -m)-pc-linux-gnu/bin/ld"]) diff --git a/screens/install/install.py b/screens/install/install.py @@ -343,7 +343,8 @@ class Install: for name, pkg in self.pkgs.items(): # Archive is not here, we need to download it. - if os.path.isfile(self.arch_dir + pkg[1]["archive"]) == False: + if os.path.isfile(self.arch_dir + pkg[1]["archive"]) == False and + type(pkg[1]["archive"]) != type(False): to_dl.append(pkg[1]) # If we got any package to download, download them. @@ -366,6 +367,8 @@ class Install: # Iterating over the packages for name, p in lst.items(): + if type(p[1]["archive"] == type(False)): + continue # Update the progress bar self.dlg.gauge_update(int((unpacked * 100) / to_unpack), "Unpacking "+ p[1]["archive"] + "...", True) @@ -427,6 +430,9 @@ class Install: # Iterate over the packages to check for name, pkg in pkg_list.items(): + if type(pkg[1]["archive"]) == type(False): + continue + # Read the archive into string with open(self.arch_dir + pkg[1]["archive"], "rb") as fd: pkg_content = fd.read()