aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-06-28 23:47:13 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-06-28 23:47:13 +0300
commit64513feb88fe10a72cace2b2e7dbd5a07f8210c5 (patch)
treef3c2fba1ed9a2a95697bb2e7c8b1890967bf4fae /pomu/source
parentMajor updates and refactorings (diff)
downloadpomu-64513feb88fe10a72cace2b2e7dbd5a07f8210c5.tar.gz
pomu-64513feb88fe10a72cace2b2e7dbd5a07f8210c5.tar.bz2
pomu-64513feb88fe10a72cace2b2e7dbd5a07f8210c5.zip
Resolve circular imports
Convert dispatcher to selectable repos Move suffixes to util.pkg module
Diffstat (limited to 'pomu/source')
-rw-r--r--pomu/source/manager.py11
1 files changed, 5 insertions, 6 deletions
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)