From 64513feb88fe10a72cace2b2e7dbd5a07f8210c5 Mon Sep 17 00:00:00 2001 From: Mykyta Holubakha Date: Wed, 28 Jun 2017 23:47:13 +0300 Subject: Resolve circular imports Convert dispatcher to selectable repos Move suffixes to util.pkg module --- pomu/source/manager.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'pomu/source') diff --git a/pomu/source/manager.py b/pomu/source/manager.py index 47c4953..b91bdd0 100644 --- a/pomu/source/manager.py +++ b/pomu/source/manager.py @@ -29,7 +29,6 @@ Example: #import bisect import inspect -from pomu.repo.repo import pomu_active_repo from pomu.util.result import Result class PackageDispatcher(): @@ -95,12 +94,12 @@ class PackageDispatcher(): return Result.Ok(source.fetch_package(res.ok())) return Result.Err('No handler found for package ' + uri) - def install_package(self, uri): - """Install a package specified by the descriptor""" + def install_package(self, repo, uri): + """Install a package specified by the descriptor into the repository""" pkg = self.get_package(uri).unwrap() - return pomu_active_repo().merge(pkg) + return repo.merge(pkg) - def uninstall_package(self, uri): + def uninstall_package(self, repo, uri): """Uninstall a package specified by the descriptor""" pkg = self.get_package(uri).unwrap() - return pomu_active_repo().unmerge(pkg) + return repo.unmerge(pkg) -- cgit v1.2.3-65-gdbad