From 5f4251c321d8dbb80403b7068c7d70711dbbb2ff Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 5 Mar 2020 15:30:23 +0100 Subject: [PATCH 1/6] Fix aligment Signed-off-by: Dimitris Zlatanidis --- slpkg/sbo/slackbuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 78021dc3..4e56ac51 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -269,7 +269,7 @@ class SBoInstall(BlackList, Utils): args[3] arch """ ver = GetFromInstalled(args[1]).version() - print(f" {args[0]}{args[1] + ver} {self.endc}" + print(f" {args[0]}{args[1] + ver} {self.endc}" f"{' ' * (24-len(args[1] + ver))}{args[2]}" f"{' ' * (18-len(args[2]))} {args[3]}" f"{' ' * (15-len(args[3]))}{''}" From 661e5bf41865b3e9cecdb51b7c5047870cc50d32 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 5 Mar 2020 16:49:52 +0100 Subject: [PATCH 2/6] Set export variable TAG #126 Signed-off-by: Dimitris Zlatanidis --- ChangeLog.txt | 4 ++++ slpkg/sbo/slack_find.py | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index b88bcdc3..f416ec50 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +3.8.5 - 5/03/2020 +Added: +- set export variable $TAG #126 + 3.8.4 - 25/02/2020 BugFix: - Grab MD5SUM from wrong info file return None diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 0ae65320..ba5d6ca4 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -22,6 +22,7 @@ # along with this program. If not, see . +import os from pkg_resources import parse_version from slpkg.messages import Msg @@ -34,16 +35,26 @@ def slack_package(prgnam): """Return maximum binary Slackware package from output directory """ msg = Msg() + TAG, binaries, cache, binary = "_SBo", [], "0", "" + + for tags in os.environ.keys(): + if tags == "TAG": + TAG = os.environ['TAG'] + break + binaries, cache, binary = [], "0", "" for pkg in find_package(prgnam, _meta_.output): - if pkg.startswith(prgnam) and pkg[:-4].endswith("_SBo"): + if pkg.startswith(prgnam) and pkg[:-4].endswith(TAG): binaries.append(pkg) + for bins in binaries: binary = bins if parse_version(bins) > parse_version(cache): binary = bins cache = binary + if not binary: msg.build_FAILED(prgnam) raise SystemExit(1) + return ["".join(_meta_.output + binary)] From f69748cfb68608277ae379a3962c07133c492247 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 5 Mar 2020 23:23:05 +0100 Subject: [PATCH 3/6] Updated for version 3.8.5 Signed-off-by: Dimitris Zlatanidis --- README.md | 2 +- slpkg/__metadata__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d60e95f3..b9c6dbe8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# slpkg 3.8.4 +# slpkg 3.8.5 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/slpkg/__metadata__.py b/slpkg/__metadata__.py index 297c1c08..754de0ba 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -76,7 +76,7 @@ class MetaData: __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (3, 8, 4) + __version_info__ = (3, 8, 5) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" From 9c770700494b2436c22b6d6786bca65fd6dac91f Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 5 Mar 2020 23:49:45 +0100 Subject: [PATCH 4/6] Remove double code Signed-off-by: Dimitris Zlatanidis --- slpkg/sbo/slack_find.py | 1 - 1 file changed, 1 deletion(-) diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index ba5d6ca4..45c7c69f 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -42,7 +42,6 @@ def slack_package(prgnam): TAG = os.environ['TAG'] break - binaries, cache, binary = [], "0", "" for pkg in find_package(prgnam, _meta_.output): if pkg.startswith(prgnam) and pkg[:-4].endswith(TAG): binaries.append(pkg) From 15c8e0f1a2287f4242c16483118b28ed0c7fd2af Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 6 Mar 2020 13:44:45 +0100 Subject: [PATCH 5/6] Updated message Signed-off-by: Dimitris Zlatanidis --- slpkg/sbo/slack_find.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 45c7c69f..95e8fe3a 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -53,7 +53,7 @@ def slack_package(prgnam): cache = binary if not binary: - msg.build_FAILED(prgnam) + msg.pkg_not_found(prgnam) raise SystemExit(1) return ["".join(_meta_.output + binary)] From ec71e7c749fd1c55a3c78f87391e096b7d6817a0 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 6 Mar 2020 16:58:36 +0100 Subject: [PATCH 6/6] Updated var name Signed-off-by: Dimitris Zlatanidis --- slpkg/sbo/slack_find.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 95e8fe3a..f6ee70a3 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -37,9 +37,9 @@ def slack_package(prgnam): msg = Msg() TAG, binaries, cache, binary = "_SBo", [], "0", "" - for tags in os.environ.keys(): - if tags == "TAG": - TAG = os.environ['TAG'] + for exp in os.environ.keys(): + if exp == "TAG": + TAG = os.environ["TAG"] break for pkg in find_package(prgnam, _meta_.output):