Fixed message resolve view/unview

This commit is contained in:
Dimitris Zlatanidis 2015-06-04 05:59:56 +03:00
parent 8a620c1dd0
commit f612934557
4 changed files with 14 additions and 9 deletions

View file

@ -49,7 +49,7 @@ def pkg_upgrade(repo, skip):
# location = data[1]
# size = data[2]
# unsize = data[3]
data = repo_data(PACKAGES_TXT, 2000, repo)
data = repo_data(PACKAGES_TXT, 2000, repo, True)
index, toolbar_width = 0, 1000
for pkg in installed():
index += 1

View file

@ -32,7 +32,7 @@ from slpkg.__metadata__ import MetaData as _m
from slpkg.slack.slack_version import slack_ver
def repo_data(PACKAGES_TXT, step, repo):
def repo_data(PACKAGES_TXT, step, repo, resolve):
'''
Grap data packages
'''
@ -40,6 +40,7 @@ def repo_data(PACKAGES_TXT, step, repo):
rname, rlocation, rsize, runsize) = ([] for i in range(8))
index, toolbar_width = 0, 100
for line in PACKAGES_TXT.splitlines():
if _m.rsl_deps in ['on', 'ON'] and resolve:
index += 1
toolbar_width = status(index, toolbar_width, step)
if line.startswith("PACKAGE NAME:"):

View file

@ -83,6 +83,7 @@ class BinaryInstall(object):
self.packages = self.clear_masters()
(self.dwn, self.install, self.comp_sum,
self.uncomp_sum) = self.store(self.packages)
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().done()
if self.install:
print("\nThe following packages will be automatically "
@ -204,6 +205,7 @@ class BinaryInstall(object):
Return package dependencies
'''
requires = []
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().resolving()
for dep in self.packages:
if self.if_upgrade:
@ -263,7 +265,7 @@ class BinaryInstall(object):
# location = data[1]
# size = data[2]
# unsize = data[3]
data = repo_data(self.PACKAGES_TXT, self.step, self.repo)
data = repo_data(self.PACKAGES_TXT, self.step, self.repo, self.resolve)
for pkg in packages:
for name, loc, comp, uncomp in zip(data[0], data[1], data[2],
data[3]):

View file

@ -84,9 +84,11 @@ class SBoInstall(object):
self.master_packages, mas_src = self.sbo_version_source(
self.package_found)
Msg().done()
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().resolving()
self.dependencies, dep_src = self.sbo_version_source(
self.one_for_all(self.deps))
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().done()
self.clear_masters()
if self.package_found: