From 3303aecf6d1bc7e47801412998f89b30b8428522 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 14 Oct 2017 20:29:07 +0200 Subject: [PATCH] Fix: Strange dependency problem (2) #97 Signed-off-by: Dimitris Zlatanidis --- slpkg/binary/install.py | 10 ++++++++-- slpkg/messages.py | 2 +- slpkg/sbo/slackbuild.py | 11 ++++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/slpkg/binary/install.py b/slpkg/binary/install.py index 3e81ec89..1607cbc0 100644 --- a/slpkg/binary/install.py +++ b/slpkg/binary/install.py @@ -104,10 +104,11 @@ class BinaryInstall(object): "--resolve-off" not in self.flag): self.msg.done() if self.install: - print("\nThe following packages will be automatically " - "installed or upgraded \nwith new version:\n") if self.matching: self.msg.matching(self.packages) + else: + print("\nThe following packages will be automatically " + "installed or upgraded \nwith new version:\n") self.top_view() self.msg.upg_inst(self.is_upgrade) mas_sum = self.views(self.install, self.comp_sum) @@ -120,6 +121,11 @@ class BinaryInstall(object): sums = [sum(i) for i in zip(mas_sum, dep_sum)] unit, size = units(self.comp_sum + self.dep_comp_sum, self.uncomp_sum + self.dep_uncomp_sum) + if self.matching: + print("\nMatching summary") + print("=" * 79) + print("Total {0} matching packages\n".format(sum(sums))) + raise SystemExit(1) print("\nInstalling summary") print("=" * 79) print("{0}Total {1} {2}.".format(self.meta.color["GREY"], diff --git a/slpkg/messages.py b/slpkg/messages.py index 7a238167..785f7461 100644 --- a/slpkg/messages.py +++ b/slpkg/messages.py @@ -165,7 +165,7 @@ class Msg(object): def matching(self, packages): """Message for matching packages """ - print("Not found package with the name [ {0}{1}{2} ]. " + print("\nNot found package with the name [ {0}{1}{2} ]. " "Matching packages:\nNOTE: Not dependenc" "ies are resolved\n".format(self.meta.color["CYAN"], "".join(packages), diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 2236904d..2531448e 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -117,10 +117,11 @@ class SBoInstall(object): self.clear_masters() if self.package_found: - print("\nThe following packages will be automatically " - "installed or upgraded \nwith new version:\n") if self.match: self.msg.matching(self.slackbuilds) + else: + print("\nThe following packages will be automatically " + "installed or upgraded \nwith new version:\n") self.top_view() self.msg.upg_inst(self.is_upgrade) @@ -141,8 +142,12 @@ class SBoInstall(object): count_total = sum([self.count_ins, self.count_upg, self.count_uni]) + if self.match: + print("\nMatching summary") + print("=" * 79) + print("Total {0} matching packages\n".format(count_total)) + raise SystemExit(1) print("\nInstalling summary") - print("=" * 79) print("{0}Total {1} {2}.".format( self.meta.color["GREY"], count_total, self.msg.pkg(count_total)))