From f972d203fb70c6f572ebbd301ad6fcfa32bff684 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 16 Feb 2015 13:06:12 +0200 Subject: [PATCH] fix remove package with dependencies --- slpkg/pkg/manager.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index 3acf880e..67c539a9 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -116,9 +116,8 @@ class PackageManager(object): if os.path.isfile(dep_path + rmv) and _m.del_deps == "on": dependencies = self._view_deps(dep_path, rmv) if self._rmv_deps_answer() in ['y', 'Y']: - rmv_list += self._rmv_deps(self.binary, - dependencies, - dep_path, rmv) + rmv_list += (self._rmv_deps(dependencies, dep_path, + rmv)) else: rmv_list += self._rmv_pkg(rmv) os.remove(dep_path + rmv) @@ -175,13 +174,13 @@ class PackageManager(object): Msg().template(78) return dependencies - def _rmv_deps(self, binary, dependencies, path, package): + def _rmv_deps(self, dependencies, path, package): ''' Remove dependencies ''' removes = [] deps = dependencies.split() - deps.append(''.join(binary)) + deps.append(package) for dep in deps: if find_package(dep + _m.sp, _m.pkg_path): print(subprocess.check_output("removepkg {0}".format(dep),