diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2017-06-07 04:44:55 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2017-06-07 04:44:55 +0300 |
commit | a2d46564fc78a6759624aeea595eed8a89776b0c (patch) | |
tree | b70f1a9d0f5c5ccbe7e4bed902dcff52a60bdeab | |
parent | Process on package impl (diff) | |
download | pomu-a2d46564fc78a6759624aeea595eed8a89776b0c.tar.gz pomu-a2d46564fc78a6759624aeea595eed8a89776b0c.tar.bz2 pomu-a2d46564fc78a6759624aeea595eed8a89776b0c.zip |
Fix multiple issues with packages and repositories
-rw-r--r-- | pomu/package.py | 2 | ||||
-rw-r--r-- | pomu/repo/repo.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/pomu/package.py b/pomu/package.py index f3319f1..65c6d18 100644 --- a/pomu/package.py +++ b/pomu/package.py @@ -42,7 +42,7 @@ class Package(): return d_path def read_path(self, d_path): - for wd, dirs, files in d_path: + for wd, dirs, files in os.walk(d_path): wd = self.strip_root(wd) self.files.extend([(wd, f) for f in files]) diff --git a/pomu/repo/repo.py b/pomu/repo/repo.py index 1e384cd..f72b996 100644 --- a/pomu/repo/repo.py +++ b/pomu/repo/repo.py @@ -6,8 +6,8 @@ from git import Repo import portage class Repository(): - def __init__(self, path): - if not pomu_status(path): + def __init__(self, root): + if not pomu_status(root): raise ValueError('This path is not a valid pomu repository') self.root = root @@ -30,7 +30,8 @@ class Repository(): r = self.repo for wd, f in package.files: dst = path.join(self.root, wd) - r.index.remove(path.join(package.root, wd, f) + r.index.remove(path.join(self.root, wd, f)) + os.remove(path.join(self.root, wd, f)) try: rmdir(dst) except OSError: pass |