diff --git a/ChangeLog.txt b/ChangeLog.txt index c40b5a56..0d28d120 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,12 @@ -3.7.5 - 15/01/2020 +3.8.0 - 05/02/2020 +Added: +- Many changes happen in this version, a big part of code has been rewritten +- to improve the code for support Python 3. Possibly will there are some bugs +- in the feture versions I would appreciate it if report them. + +- Cheers, +- Dimitris + Fixed: - Bugfix: merge files with slack repository between current and slack versions Updated: diff --git a/INSTALL.md b/INSTALL.md index 38a74119..8ff23b8f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -22,5 +22,5 @@ There are mainly 3 ways: 2. Download binary package from '`https://sourceforge.net/projects/slpkg/files/binary/`' and use Slackware command '`upgradepkg --install-new `' -3. Using pip: '`pip3 install https://gitlab.com/dslackw/slpkg/-/archive/3.7.0/slpkg-3.7.0.tar.gz`' +3. Using pip: '`pip3 install https://gitlab.com/dslackw/slpkg/-/archive/3.8.0/slpkg-3.8.0.tar.gz`' or instead '`'python3 -m pip install`''. diff --git a/README.md b/README.md index 0edd481e..b72c5db1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# slpkg 3.7.4 +# slpkg 3.8.0 Slpkg is a powerful software package manager that installs, updates, and removes packages on [Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and diff --git a/bin/slpkg b/bin/slpkg index d00add3c..0903aa1a 100755 --- a/bin/slpkg +++ b/bin/slpkg @@ -3,7 +3,7 @@ # slpkg file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/clean.py b/clean.py index 16c4ee13..fcff74d5 100755 --- a/clean.py +++ b/clean.py @@ -3,7 +3,7 @@ # clean.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/install.sh b/install.sh index 4dbd5831..d3b9c8c6 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ # install.sh file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # # Redistribution and use of this script, with or without modification, is diff --git a/setup.py b/setup.py index cc81c26f..d66454e3 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # setup.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 437131cd..0f3496d9 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for slpkg -# Copyright 2014-2019 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2014-2020 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 704a52ee..d9d5aaba 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -3,7 +3,7 @@ # __metadata__.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -29,11 +29,9 @@ def remove_repositories(repositories, default_repositories): """ Remove no default repositories """ - repos = [] for repo in repositories: if repo in default_repositories: - repos.append(repo) - return repos + yield repo def update_repositories(repositories, conf_path): @@ -78,7 +76,7 @@ class MetaData: __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (3, 7, 5) + __version_info__ = (3, 8, 0) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" @@ -194,7 +192,7 @@ class MetaData: mles_sub_repo = grab_sub_repo(repositories, "mles") # remove no default repositories - repositories = remove_repositories(repositories, default_repositories) + repositories = list(remove_repositories(repositories, default_repositories)) # add custom repositories update_repositories(repositories, conf_path) diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 75e972fd..ede7b131 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -3,7 +3,7 @@ # arguments.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/auto_pkg.py b/slpkg/auto_pkg.py index 5b81daa3..fc40efe5 100644 --- a/slpkg/auto_pkg.py +++ b/slpkg/auto_pkg.py @@ -3,7 +3,7 @@ # auto_pkg.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/check.py b/slpkg/binary/check.py index d6c14459..e64611ec 100644 --- a/slpkg/binary/check.py +++ b/slpkg/binary/check.py @@ -3,7 +3,7 @@ # check.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/dependency.py b/slpkg/binary/dependency.py index fe3e9495..ea8b9a4e 100644 --- a/slpkg/binary/dependency.py +++ b/slpkg/binary/dependency.py @@ -3,7 +3,7 @@ # dependency.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/greps.py b/slpkg/binary/greps.py index fc07c2a7..231f7e5f 100644 --- a/slpkg/binary/greps.py +++ b/slpkg/binary/greps.py @@ -3,7 +3,7 @@ # greps.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/install.py b/slpkg/binary/install.py index ff7a98b6..d0ac5988 100644 --- a/slpkg/binary/install.py +++ b/slpkg/binary/install.py @@ -3,7 +3,7 @@ # install.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/repo_init.py b/slpkg/binary/repo_init.py index eb3e9986..7fba70f9 100644 --- a/slpkg/binary/repo_init.py +++ b/slpkg/binary/repo_init.py @@ -3,7 +3,7 @@ # repo_init.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/search.py b/slpkg/binary/search.py index 5673d967..548c8565 100644 --- a/slpkg/binary/search.py +++ b/slpkg/binary/search.py @@ -3,7 +3,7 @@ # search.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index e074b674..284a9221 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -3,7 +3,7 @@ # blacklist.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/checks.py b/slpkg/checks.py index 58ec3435..1c0fab67 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -3,7 +3,7 @@ # checks.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -133,4 +133,5 @@ class Updates: cmd = "Repository is updated." if self.count_news > 0: cmd = "Run the command 'slpkg update'." - print(f"{self.grey}From {self.count_repo} repositories need {self.count_news} updating. {cmd}{self.endc}", end="\n") \ No newline at end of file + print(f"{self.grey}From {self.count_repo} repositories need" + f" {self.count_news} updating. {cmd}{self.endc}", end="\n") diff --git a/slpkg/checksum.py b/slpkg/checksum.py index 5f021662..0a362988 100644 --- a/slpkg/checksum.py +++ b/slpkg/checksum.py @@ -3,7 +3,7 @@ # checksum.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -38,7 +38,8 @@ def check_md5(pkg_md5, src_file): md5s = md5(src_file) if pkg_md5 != md5s: Msg().template(78) - print(f"| MD5SUM check for {src_file.split('/')[-1]} [ {red}FAILED{endc} ]") + print(f"| MD5SUM check for {src_file.split('/')[-1]}" + f" [ {red}FAILED{endc} ]") Msg().template(78) print(f"| Expected: {pkg_md5}") print(f"| Found: {md5s}") @@ -48,6 +49,7 @@ def check_md5(pkg_md5, src_file): raise SystemExit() else: Msg().template(78) - print(f"| MD5SUM check for {src_file.split('/')[-1]} [ {green}PASSED{endc} ]") + print(f"| MD5SUM check for {src_file.split('/')[-1]}" + f" [ {green}PASSED{endc} ]") Msg().template(78) print() # new line after pass checksum diff --git a/slpkg/clean.py b/slpkg/clean.py index 4bea6610..5f20369e 100644 --- a/slpkg/clean.py +++ b/slpkg/clean.py @@ -3,7 +3,7 @@ # clean.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/config.py b/slpkg/config.py index db9d9286..09b953d7 100644 --- a/slpkg/config.py +++ b/slpkg/config.py @@ -3,7 +3,7 @@ # config.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -86,8 +86,8 @@ class Config: def reset(self): """Reset slpkg.conf file with default values """ - shutil.copy2(self.config_file + ".orig", self.config_file) - if filecmp.cmp(self.config_file + ".orig", self.config_file): + shutil.copy2(f"{self.config_file}.orig", self.config_file) + if filecmp.cmp(f"{self.config_file}.orig", self.config_file): print(f"{self.green}The reset was done{self.endc}") else: print(f"{self.red}Reset failed{self.endc}") diff --git a/slpkg/desc.py b/slpkg/desc.py index 8ec8aa9c..42823a42 100644 --- a/slpkg/desc.py +++ b/slpkg/desc.py @@ -3,7 +3,7 @@ # desc.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/dialog_box.py b/slpkg/dialog_box.py index 7e680d65..41a8eb6d 100644 --- a/slpkg/dialog_box.py +++ b/slpkg/dialog_box.py @@ -3,7 +3,7 @@ # dialog_box.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/downloader.py b/slpkg/downloader.py index 6c5efb49..f8fd1096 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -3,7 +3,7 @@ # downloader.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -64,13 +64,20 @@ class Download: self._make_tarfile(self.file_name, source_dir) self._check_certificate() - print(f"\n[{dwn_count}/{len(self.url)}][ {self.green}Download{self.endc} ] --> {self.file_name}\n") + print(f"\n[{dwn_count}/{len(self.url)}][ {self.green}" + f"Download{self.endc} ] --> {self.file_name}\n") if self.downder in ["wget"]: - subprocess.call(f"{self.downder} {self.downder_options} {self.dir_prefix}{self.path} {dwn}", shell=True) + subprocess.call(f"{self.downder} {self.downder_options}" + f" {self.dir_prefix}{self.path} {dwn}", + shell=True) if self.downder in ["aria2c"]: - subprocess.call(f"{self.downder} {self.downder_options} {self.dir_prefix}{self.path[:-1]} {dwn}", shell=True) + subprocess.call(f"{self.downder} {self.downder_options}" + f" {self.dir_prefix}{self.path[:-1]} {dwn}", + shell=True) elif self.downder in ["curl", "http"]: - subprocess.call(f"{self.downder} {self.downder_options} {self.path}{self.file_name} {dwn}", shell=True) + subprocess.call(f"{self.downder} {self.downder_options}" + f" {self.path}{self.file_name} {dwn}", + shell=True) self._check_if_downloaded() dwn_count += 1 @@ -94,7 +101,8 @@ class Download: if not os.path.isfile(self.path + self.file_name): print() self.msg.template(78) - print(f"| Download '{self.file_name}' file [ {self.red}FAILED{self.endc} ]") + print(f"| Download '{self.file_name}' file" + f" [ {self.red}FAILED{self.endc} ]") self.msg.template(78) print() if not self.msg.answer() in ["y", "Y"]: @@ -108,9 +116,10 @@ class Download: certificate = (' --no-check-certificate --header="Cookie: ' 'oraclelicense=accept-securebackup-cookie"') self.msg.template(78) - print(f"| '{certificate[:23].strip()}' need to go ahead downloading") + print(f"| '{certificate[:23].strip()}' need to go" + f" ahead downloading") self.msg.template(78) print() self.downder_options += certificate if not self.msg.answer() in ["y", "Y"]: - raise SystemExit() \ No newline at end of file + raise SystemExit() diff --git a/slpkg/file_size.py b/slpkg/file_size.py index 2b178776..aef96023 100644 --- a/slpkg/file_size.py +++ b/slpkg/file_size.py @@ -3,7 +3,7 @@ # file_size.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/graph.py b/slpkg/graph.py index 0b18b58a..47ad3f7c 100644 --- a/slpkg/graph.py +++ b/slpkg/graph.py @@ -3,7 +3,7 @@ # graph.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/grep_md5.py b/slpkg/grep_md5.py index 7ce9563a..5ee62d68 100644 --- a/slpkg/grep_md5.py +++ b/slpkg/grep_md5.py @@ -3,7 +3,7 @@ # grep_md5.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/health.py b/slpkg/health.py index e067fb97..4072dbdd 100644 --- a/slpkg/health.py +++ b/slpkg/health.py @@ -3,7 +3,7 @@ # health.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/init.py b/slpkg/init.py index 935b3a46..8e5be858 100644 --- a/slpkg/init.py +++ b/slpkg/init.py @@ -3,7 +3,7 @@ # init.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -51,6 +51,11 @@ class Initialization: self._SOURCES = self.meta.SBo_SOURCES self.slpkg_tmp_packages = self.meta.slpkg_tmp_packages self.slpkg_tmp_patches = self.meta.slpkg_tmp_patches + self.constructing() + + def constructing(self): + """Creating the all necessary directories + """ if not os.path.exists(self.conf_path): os.mkdir(self.conf_path) if not os.path.exists(self.log_path): diff --git a/slpkg/load.py b/slpkg/load.py index 3b4b664e..44a93be5 100644 --- a/slpkg/load.py +++ b/slpkg/load.py @@ -3,7 +3,7 @@ # load.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -37,12 +37,12 @@ def library(repo): pkg_list, packages = [], "" if repo == "sbo": if (os.path.isfile( - _meta_.lib_path + f"{repo}_repo/SLACKBUILDS.TXT")): - packages = Utils().read_file(_meta_.lib_path + f"{repo}_repo/SLACKBUILDS.TXT") + f"{_meta_.lib_path}{repo}_repo/SLACKBUILDS.TXT")): + packages = Utils().read_file(f"{_meta_.lib_path}{repo}_repo/SLACKBUILDS.TXT") else: if (os.path.isfile( - _meta_.lib_path + f"{repo}_repo/PACKAGES.TXT")): - packages = Utils().read_file(_meta_.lib_path + f"{repo}_repo/PACKAGES.TXT") + f"{_meta_.lib_path}{repo}_repo/PACKAGES.TXT")): + packages = Utils().read_file(f"{_meta_.lib_path}{repo}_repo/PACKAGES.TXT") for line in packages.splitlines(): if repo == "sbo": if line.startswith("SLACKBUILD NAME: "): diff --git a/slpkg/log_deps.py b/slpkg/log_deps.py index 8ef9eb11..bb6f1a71 100644 --- a/slpkg/log_deps.py +++ b/slpkg/log_deps.py @@ -3,7 +3,7 @@ # log_deps.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/main.py b/slpkg/main.py index aa183a2f..fc144b0e 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -3,7 +3,7 @@ # main.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -324,11 +324,11 @@ class ArgParse: else: usage(self.args[1]) elif len(self.args) == 1 and self.args[0] in options: - Updates(repo="").ALL() + Updates(repo="").ALL() elif len(self.args) == 2 and self.args[0] in options: - Updates(self.args[1]).run() + Updates(self.args[1]).run() elif (len(self.args) >= 2 and self.args[0] in options and - self.args[1] not in self.meta.repositories): + self.args[1] not in self.meta.repositories): usage(self.args[1]) else: usage("") diff --git a/slpkg/md5sum.py b/slpkg/md5sum.py index 80f71495..1b7888c8 100644 --- a/slpkg/md5sum.py +++ b/slpkg/md5sum.py @@ -3,7 +3,7 @@ # md5sum.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/messages.py b/slpkg/messages.py index de36ba3b..1dbaf3e1 100644 --- a/slpkg/messages.py +++ b/slpkg/messages.py @@ -3,7 +3,7 @@ # messages.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/new_config.py b/slpkg/new_config.py index ece01a3a..b6946bd0 100644 --- a/slpkg/new_config.py +++ b/slpkg/new_config.py @@ -3,7 +3,7 @@ # new_config.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py index 81eeb46b..5d591f89 100644 --- a/slpkg/pkg/build.py +++ b/slpkg/pkg/build.py @@ -3,7 +3,7 @@ # build.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/find.py b/slpkg/pkg/find.py index c75f5d13..3133257b 100644 --- a/slpkg/pkg/find.py +++ b/slpkg/pkg/find.py @@ -3,7 +3,7 @@ # find.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/installed.py b/slpkg/pkg/installed.py index d2085d73..fd957f65 100644 --- a/slpkg/pkg/installed.py +++ b/slpkg/pkg/installed.py @@ -3,7 +3,7 @@ # installed.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index 60ab5ec7..6203a67a 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -3,7 +3,7 @@ # manager.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -407,10 +407,10 @@ class PackageManager: match_cache = match.lower() if ("--third-party" in flag and not self.binary and split_name not in slack_names): - packages.append(match) + packages.append(match) if ("--third-party" in flag and pkg_cache in match_cache and split_name not in slack_names): - packages.append(match) + packages.append(match) if pkg_cache in match_cache and not flag: packages.append(match) if ("--case-ins" in flag and "--third-party" not in flag and diff --git a/slpkg/pkg_find.py b/slpkg/pkg_find.py index bbe9c35e..bac334e1 100644 --- a/slpkg/pkg_find.py +++ b/slpkg/pkg_find.py @@ -3,7 +3,7 @@ # pkg_find.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -80,5 +80,5 @@ class FindFromRepos: """ ver = "" if repo == "sbo": - ver = "-" + SBoGrep(find).version() + ver = f"-{SBoGrep(find).version()}" return ver diff --git a/slpkg/remove.py b/slpkg/remove.py index c8d8fea4..63824961 100644 --- a/slpkg/remove.py +++ b/slpkg/remove.py @@ -3,7 +3,7 @@ # remove.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repoenable.py b/slpkg/repoenable.py index 7ad6b9d6..22b1782a 100644 --- a/slpkg/repoenable.py +++ b/slpkg/repoenable.py @@ -3,7 +3,7 @@ # repoenable.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repoinfo.py b/slpkg/repoinfo.py index 43ef3ff4..253c4f2e 100644 --- a/slpkg/repoinfo.py +++ b/slpkg/repoinfo.py @@ -3,7 +3,7 @@ # repoinfo.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repolist.py b/slpkg/repolist.py index 7f372db9..c222024e 100644 --- a/slpkg/repolist.py +++ b/slpkg/repolist.py @@ -3,7 +3,7 @@ # repolist.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repositories.py b/slpkg/repositories.py index 5a77b726..160e4884 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -3,7 +3,7 @@ # repositories.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/autobuild.py b/slpkg/sbo/autobuild.py index 858e0f44..8af5bc1e 100644 --- a/slpkg/sbo/autobuild.py +++ b/slpkg/sbo/autobuild.py @@ -3,7 +3,7 @@ # autobuild.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/build_num.py b/slpkg/sbo/build_num.py index 2d41345f..57426f42 100644 --- a/slpkg/sbo/build_num.py +++ b/slpkg/sbo/build_num.py @@ -3,7 +3,7 @@ # build_num.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index 9288090c..8f33c6fa 100644 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -3,7 +3,7 @@ # check.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/compressed.py b/slpkg/sbo/compressed.py index 17db6ca8..09f9c065 100644 --- a/slpkg/sbo/compressed.py +++ b/slpkg/sbo/compressed.py @@ -3,7 +3,7 @@ # download.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/dependency.py b/slpkg/sbo/dependency.py index e6e428a7..7401ee2c 100644 --- a/slpkg/sbo/dependency.py +++ b/slpkg/sbo/dependency.py @@ -3,7 +3,7 @@ # dependency.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -68,5 +68,4 @@ class Requires: """ if dependencies: self.dep_results.append(dependencies) - for dep in dependencies: - self.sbo(dep) \ No newline at end of file + [self.sbo(dep) for dep in dependencies] \ No newline at end of file diff --git a/slpkg/sbo/greps.py b/slpkg/sbo/greps.py index 21be0426..095a0089 100644 --- a/slpkg/sbo/greps.py +++ b/slpkg/sbo/greps.py @@ -3,7 +3,7 @@ # greps.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/network.py b/slpkg/sbo/network.py index 40ab682b..411b8580 100644 --- a/slpkg/sbo/network.py +++ b/slpkg/sbo/network.py @@ -3,7 +3,7 @@ # network.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -23,7 +23,6 @@ import os -import sys import pydoc from slpkg.utils import Utils diff --git a/slpkg/sbo/queue.py b/slpkg/sbo/queue.py index fd7547cb..7cfe8f8e 100644 --- a/slpkg/sbo/queue.py +++ b/slpkg/sbo/queue.py @@ -3,7 +3,7 @@ # queue.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/read.py b/slpkg/sbo/read.py index bb6190b6..e4eb2e75 100644 --- a/slpkg/sbo/read.py +++ b/slpkg/sbo/read.py @@ -3,7 +3,7 @@ # read.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/sbo_arch.py b/slpkg/sbo/sbo_arch.py index e136af07..f50bf0e1 100644 --- a/slpkg/sbo/sbo_arch.py +++ b/slpkg/sbo/sbo_arch.py @@ -3,7 +3,7 @@ # sbo_arch.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/search.py b/slpkg/sbo/search.py index e6ce7e75..1436af11 100644 --- a/slpkg/sbo/search.py +++ b/slpkg/sbo/search.py @@ -3,7 +3,7 @@ # search.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 5001ab88..923965e5 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -3,7 +3,7 @@ # slack_find.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 6cc1071a..772f7ea2 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -3,7 +3,7 @@ # slackbuild.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -58,6 +58,7 @@ class SBoInstall: self.flag = flag self.meta = _meta_ self.green = _meta_.color["GREEN"] + self.red = _meta_.color["RED"] self.yellow = _meta_.color["YELLOW"] self.grey = _meta_.color["GREY"] self.endc = _meta_.color["ENDC"] @@ -353,7 +354,6 @@ class SBoInstall: if "--download-only" in self.flag: continue sources = list(self.filenames(src_link)) - print(sources) BuildPackage(script, sources, self.build_folder, auto=False).build() binary = slack_package(prgnam) diff --git a/slpkg/security.py b/slpkg/security.py index e7bcbcd1..b53a0a3f 100644 --- a/slpkg/security.py +++ b/slpkg/security.py @@ -3,7 +3,7 @@ # security.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sizes.py b/slpkg/sizes.py index ec55678a..69c6a42f 100644 --- a/slpkg/sizes.py +++ b/slpkg/sizes.py @@ -3,7 +3,7 @@ # sizes.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/mirrors.py b/slpkg/slack/mirrors.py index 50af32a8..d05a2e08 100644 --- a/slpkg/slack/mirrors.py +++ b/slpkg/slack/mirrors.py @@ -3,7 +3,7 @@ # mirrors.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index 8b3f1d7f..0c483dd6 100644 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -3,7 +3,7 @@ # patches.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/slack_version.py b/slpkg/slack/slack_version.py index 02dc2904..d3163ca4 100644 --- a/slpkg/slack/slack_version.py +++ b/slpkg/slack/slack_version.py @@ -3,7 +3,7 @@ # slack_version.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/slackware_repo.py b/slpkg/slack/slackware_repo.py index 65a0b2ec..d1e1a4ce 100644 --- a/slpkg/slack/slackware_repo.py +++ b/slpkg/slack/slackware_repo.py @@ -3,7 +3,7 @@ # slackware_repo.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slpkg_update.py b/slpkg/slpkg_update.py index bbf585e9..cc123a7e 100644 --- a/slpkg/slpkg_update.py +++ b/slpkg/slpkg_update.py @@ -3,7 +3,7 @@ # slpkg_update.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/splitting.py b/slpkg/splitting.py index 56d8bfbb..c89ec3b6 100644 --- a/slpkg/splitting.py +++ b/slpkg/splitting.py @@ -3,7 +3,7 @@ # splitting.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/status_deps.py b/slpkg/status_deps.py index 3ba896cf..cacfc6d7 100644 --- a/slpkg/status_deps.py +++ b/slpkg/status_deps.py @@ -3,7 +3,7 @@ # status_deps.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/superuser.py b/slpkg/superuser.py index 6b2027b2..0c6ec6ec 100644 --- a/slpkg/superuser.py +++ b/slpkg/superuser.py @@ -3,7 +3,7 @@ # superuser.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/toolbar.py b/slpkg/toolbar.py index a193c6d7..9e23444c 100644 --- a/slpkg/toolbar.py +++ b/slpkg/toolbar.py @@ -3,7 +3,7 @@ # toolbar.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/tracking.py b/slpkg/tracking.py index c9a51743..6457ba8a 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -3,7 +3,7 @@ # tracking.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/upgrade_checklist.py b/slpkg/upgrade_checklist.py index 9b03e773..f8f93aba 100644 --- a/slpkg/upgrade_checklist.py +++ b/slpkg/upgrade_checklist.py @@ -3,7 +3,7 @@ # upgrade_checklist.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/url_read.py b/slpkg/url_read.py index 1763f810..e5632d0f 100644 --- a/slpkg/url_read.py +++ b/slpkg/url_read.py @@ -3,7 +3,7 @@ # url_read.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/utils.py b/slpkg/utils.py index acca1a5d..fe4dedb1 100644 --- a/slpkg/utils.py +++ b/slpkg/utils.py @@ -3,7 +3,7 @@ # utils.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/version.py b/slpkg/version.py index 8f4ee290..e45b2b81 100644 --- a/slpkg/version.py +++ b/slpkg/version.py @@ -3,7 +3,7 @@ # version.py file is part of slpkg. -# Copyright 2014-2019 Dimitris Zlatanidis +# Copyright 2014-2020 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/tests/test_md5sum.py b/tests/test_md5sum.py index 5adf9dfd..71109f9a 100644 --- a/tests/test_md5sum.py +++ b/tests/test_md5sum.py @@ -3,9 +3,9 @@ from slpkg.md5sum import md5 def test_md5_superuser(): result = md5('slpkg/superuser.py') - assert result == "e6cebdf37fbc1b8e9d3c5e3e53b300c1" + assert result == "25ec85aa9c2803ece6397e4147449ea6" def test_md5_security(): result = md5('slpkg/security.py') - assert result == "d395d2fcf1c7b1a91ef6ce3dc8eb047b" \ No newline at end of file + assert result == "3f10bf99b21f66af879dc0882bcd92b3"