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,8 +40,9 @@ 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():
index += 1
toolbar_width = status(index, toolbar_width, step)
if _m.rsl_deps in ['on', 'ON'] and resolve:
index += 1
toolbar_width = status(index, toolbar_width, step)
if line.startswith("PACKAGE NAME:"):
if repo == "slackr":
name.append(fix_slackers_pkg(line[15:]))

View file

@ -83,7 +83,8 @@ class BinaryInstall(object):
self.packages = self.clear_masters()
(self.dwn, self.install, self.comp_sum,
self.uncomp_sum) = self.store(self.packages)
Msg().done()
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().done()
if self.install:
print("\nThe following packages will be automatically "
"installed or upgraded \nwith new version:\n")
@ -204,7 +205,8 @@ class BinaryInstall(object):
Return package dependencies
'''
requires = []
Msg().resolving()
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().resolving()
for dep in self.packages:
if self.if_upgrade:
dep = dep.split("-")[0]
@ -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,10 +84,12 @@ class SBoInstall(object):
self.master_packages, mas_src = self.sbo_version_source(
self.package_found)
Msg().done()
Msg().resolving()
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))
Msg().done()
if _m.rsl_deps in ['on', 'ON'] and self.resolve:
Msg().done()
self.clear_masters()
if self.package_found:
print("\nThe following packages will be automatically "