Feature: added excluded pkgs from removal

This commit is contained in:
Dimitris Zlatanidis 2015-06-11 03:47:35 +03:00
parent 1d2907df6b
commit 5a37c1c85b

View file

@ -175,8 +175,19 @@ class PackageManager(object):
removes = [] removes = []
deps = dependencies.split() deps = dependencies.split()
deps.append(package) deps.append(package)
print("")
Msg().template(78)
print("| Enter some packages splitting with comma ',' for be excluded\n"
"| from the removal or hit Enter to continue:")
Msg().template(78)
try:
skip = raw_input("| > ").split(",")
except KeyboardInterrupt:
print("")
sys.exit(0)
for dep in deps: for dep in deps:
if find_package(dep + self.meta.sp, self.meta.pkg_path): if (dep not in skip
and find_package(dep + self.meta.sp, self.meta.pkg_path)):
subprocess.call("removepkg {0} {1}".format(self.flag, dep), subprocess.call("removepkg {0} {1}".format(self.flag, dep),
shell=True) shell=True)
removes.append(dep) removes.append(dep)