mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-29 10:26:12 +01:00
FIx style
This commit is contained in:
parent
ced11fe0be
commit
1ec298716e
4 changed files with 18 additions and 12 deletions
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue