install

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

commit 0b1101498fa9446a423b847adf9eb2a383073b24
parent 32d652e8bf70b7de664afd45f0e55200009a390d
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Wed, 30 Nov 2016 13:55:13 +0100

Fix(Checksum): Fix archive verification:

Change the install site too, now in https

Diffstat:
Mpkgs/binutils_p1/binutils_p1.py | 2+-
Mscreens/install/install.py | 11+++++++----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/pkgs/binutils_p1/binutils_p1.py b/pkgs/binutils_p1/binutils_p1.py @@ -38,7 +38,7 @@ class Binutils_P1: "tmp_install": True, # Is this package part of the temporary install "next": "test2", # Next package to install "urls": [ # Url to download the package. The first one must be morphux servers - "ftp://install.morphux.org/packages/binutils-2.27.tar.bz2", + "https://install.morphux.org/packages/binutils-2.27.tar.bz2", "http://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.bz2", ] } diff --git a/screens/install/install.py b/screens/install/install.py @@ -324,15 +324,18 @@ class Install: # Iterate over the packages to check for name, pkg in pkg_list.items(): - # This is UGLY - pkg_content = self.exec(["cat", self.arch_dir + pkg[1]["archive"]]) - arch_sum = self.exec(["md5sum"], input=pkg_content).decode() + # Read the archive into string + with open(self.arch_dir + pkg[1]["archive"], "rb") as fd: + pkg_content = fd.read() + + # Get the sum of the archive + arch_sum = self.exec(["md5sum"], input=bytes(pkg_content)).decode() arch_sum = arch_sum.split(" ")[0] # Checking the sum if arch_sum != pkg[1]["cheksum"]: # The sum is wrong, we warn the user, and we abort - self.dlg.infobox("The integrity of package "+ pkg[1]["name"]+ + self.dlg.msgbox("The integrity of package "+ pkg[1]["name"]+ " is wrong ! Aborting ...") sys.exit(1)