remove matching packages

This commit is contained in:
Dimitris Zlatanidis 2014-12-24 08:29:05 +02:00
parent 6047d9b234
commit c9cf2becd2

View file

@ -134,8 +134,8 @@ class OthersInstall(object):
'''
try:
dependencies = resolving_deps(self.package, self.repo)
(dwn_links, install_all, comp_sum, uncomp_sum,
matching) = self.store(dependencies)
(dwn_links, install_all, comp_sum, uncomp_sum
) = self.store(dependencies)
sys.stdout.write("{0}Done{1}\n".format(color['GREY'],
color['ENDC']))
print("") # new line at start
@ -149,7 +149,6 @@ class OthersInstall(object):
"Repos", " " * 10,
"Size"))
template(78)
if not matching:
print("Installing:")
sums = views(install_all, comp_sum, self.repo, dependencies)
unit, size = units(comp_sum, uncomp_sum)
@ -178,17 +177,6 @@ class OthersInstall(object):
self.version)
write_deps(dependencies)
delete(self.tmp_path, install_all)
else:
print("Matching:")
sums = views(install_all, comp_sum, self.repo, dependencies)
msg = msgs(install_all, sums[2])
print("\nInstalling summary")
print("=" * 79)
print("{0}Total found {1} matching {2}.".format(
color['GREY'], len(install_all), msg[1]))
print("{0} installed {1} and {2} uninstalled {3}.{4}"
"\n".format(sums[0] + sums[1], msg[0], sums[2],
msg[1], color['ENDC']))
else:
pkg_not_found("", self.package, "No matching", "\n")
except KeyboardInterrupt:
@ -201,7 +189,6 @@ class OthersInstall(object):
'''
dwn, install, comp_sum, uncomp_sum = ([] for i in range(4))
black = BlackList().packages()
matching = False
# name = data[0]
# location = data[1]
# size = data[2]
@ -228,13 +215,11 @@ class OthersInstall(object):
install.append(name)
comp_sum.append(comp)
uncomp_sum.append(uncomp)
if len(install) > 1:
matching = True
dwn.reverse()
install.reverse()
comp_sum.reverse()
uncomp_sum.reverse()
return [dwn, install, comp_sum, uncomp_sum, matching]
return [dwn, install, comp_sum, uncomp_sum]
def views(install_all, comp_sum, repository, dependencies):