From 1ec298716e9e7d88b6ec193270e54fbbaa3c8214 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 4 Jun 2015 15:31:41 +0300 Subject: [PATCH] FIx style --- slpkg/__metadata__.py | 2 +- slpkg/main.py | 21 +++++++++++++-------- slpkg/slack/patches.py | 2 +- slpkg/tracking.py | 5 +++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 7ae7688c..a72e352e 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -88,7 +88,7 @@ class MetaData(object): __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (2, 4, 1) + __version_info__ = (2, 4, 2) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" diff --git a/slpkg/main.py b/slpkg/main.py index 6f281dfe..8fb9df04 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -164,14 +164,17 @@ class ArgParse(object): if (len(self.args) == 3 and self.args[0] == '-l' and self.args[1] in _m.repositories): if self.args[2] == '--index': - PackageManager(None).list(self.args[1], True, False) + PackageManager(binary=None).list(self.args[1], index=True, + installed=False) elif self.args[2] == '--installed': - PackageManager(None).list(self.args[1], False, True) + PackageManager(binary=None).list(self.args[1], index=False, + installed=True) else: usage('') elif (len(self.args) == 2 and self.args[0] == '-l' and self.args[1] in _m.repositories): - PackageManager(None).list(self.args[1], False, False) + PackageManager(None).list(self.args[1], index=False, + installed=False) elif (len(self.args) > 1 and self.args[0] == '-l' and self.args[1] not in _m.repositories): usage(self.args[1]) @@ -196,15 +199,15 @@ class ArgParse(object): if (self.args[1] in _m.repositories and self.args[1] not in ['slack', 'sbo']): BinaryInstall(pkg_upgrade(self.args[1], skip), - self.args[1], resolve).start(True) + self.args[1], resolve).start(if_upgrade=True) elif self.args[1] == 'slack': if _m.only_installed in ['on', 'ON']: BinaryInstall(pkg_upgrade('slack', skip), - 'slack', resolve).start(True) + 'slack', resolve).start(if_upgrade=True) else: Patches(skip).start() elif self.args[1] == 'sbo': - SBoInstall(sbo_upgrade(skip), resolve).start(True) + SBoInstall(sbo_upgrade(skip), resolve).start(if_upgrade=True) else: usage(self.args[1]) else: @@ -218,9 +221,11 @@ class ArgParse(object): resolve = False if len(self.args) >= 3 and self.args[0] == '-s': if self.args[1] in _m.repositories and self.args[1] not in ['sbo']: - BinaryInstall(self.packages, self.args[1], resolve).start(False) + BinaryInstall(self.packages, self.args[1], resolve).start( + if_upgrade=False) elif self.args[1] == 'sbo': - SBoInstall(self.packages, resolve).start(False) + SBoInstall(self.packages, resolve).start( + if_upgrade=False) else: usage(self.args[1]) else: diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index 1045d36d..261924ca 100644 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -131,7 +131,7 @@ class Patches(object): ''' Store and return packages for upgrading ''' - data = repo_data(self.PACKAGES_TXT, self.step, 'slack') + data = repo_data(self.PACKAGES_TXT, self.step, 'slack', resolve=True) black = BlackList().packages() for name, loc, comp, uncomp in zip(data[0], data[1], data[2], data[3]): repo_pkg_name = split_package(name)[0] diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 0f0e5f91..b828c783 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -44,12 +44,13 @@ def track_dep(name, repo): ''' Msg().resolving() if repo == "sbo": - dependencies_list = Requires(True).sbo(name) + dependencies_list = Requires(resolve=True).sbo(name) find_pkg = sbo_search_pkg(name) else: PACKAGES_TXT = Utils().read_file(_m.lib_path + '{0}_repo/' 'PACKAGES.TXT'.format(repo)) - dependencies_list = Dependencies(PACKAGES_TXT, repo).binary(name, True) + dependencies_list = Dependencies(PACKAGES_TXT, repo).binary( + name, resolve=True) find_pkg = search_pkg(name, repo) Msg().done() if find_pkg: