mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
fix remove package with dependencies
This commit is contained in:
parent
1c3aaf1f7f
commit
f972d203fb
1 changed files with 4 additions and 5 deletions
|
@ -116,9 +116,8 @@ class PackageManager(object):
|
||||||
if os.path.isfile(dep_path + rmv) and _m.del_deps == "on":
|
if os.path.isfile(dep_path + rmv) and _m.del_deps == "on":
|
||||||
dependencies = self._view_deps(dep_path, rmv)
|
dependencies = self._view_deps(dep_path, rmv)
|
||||||
if self._rmv_deps_answer() in ['y', 'Y']:
|
if self._rmv_deps_answer() in ['y', 'Y']:
|
||||||
rmv_list += self._rmv_deps(self.binary,
|
rmv_list += (self._rmv_deps(dependencies, dep_path,
|
||||||
dependencies,
|
rmv))
|
||||||
dep_path, rmv)
|
|
||||||
else:
|
else:
|
||||||
rmv_list += self._rmv_pkg(rmv)
|
rmv_list += self._rmv_pkg(rmv)
|
||||||
os.remove(dep_path + rmv)
|
os.remove(dep_path + rmv)
|
||||||
|
@ -175,13 +174,13 @@ class PackageManager(object):
|
||||||
Msg().template(78)
|
Msg().template(78)
|
||||||
return dependencies
|
return dependencies
|
||||||
|
|
||||||
def _rmv_deps(self, binary, dependencies, path, package):
|
def _rmv_deps(self, dependencies, path, package):
|
||||||
'''
|
'''
|
||||||
Remove dependencies
|
Remove dependencies
|
||||||
'''
|
'''
|
||||||
removes = []
|
removes = []
|
||||||
deps = dependencies.split()
|
deps = dependencies.split()
|
||||||
deps.append(''.join(binary))
|
deps.append(package)
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
if find_package(dep + _m.sp, _m.pkg_path):
|
if find_package(dep + _m.sp, _m.pkg_path):
|
||||||
print(subprocess.check_output("removepkg {0}".format(dep),
|
print(subprocess.check_output("removepkg {0}".format(dep),
|
||||||
|
|
Loading…
Reference in a new issue