mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-16 03:41:11 +01:00
Feature: added excluded pkgs from removal
This commit is contained in:
parent
1d2907df6b
commit
5a37c1c85b
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue