diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2017-06-30 04:49:25 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2017-06-30 04:49:25 +0300 |
commit | c94c01482fb6cdbe017d33ed0668bcb80ba06017 (patch) | |
tree | b3d4169f121c865af037c6753d94e1978a1c6e85 /pomu/package.py | |
parent | Fix unit tests (diff) | |
download | pomu-c94c01482fb6cdbe017d33ed0668bcb80ba06017.tar.gz pomu-c94c01482fb6cdbe017d33ed0668bcb80ba06017.tar.bz2 pomu-c94c01482fb6cdbe017d33ed0668bcb80ba06017.zip |
Multiple changes and fixes for installation
make package backend optional
fix merge destination makedir
properly add files to git index
compare package slot with default the right way
multiple fixes in writing metadata
changed tests to reflect current code and pass
Diffstat (limited to 'pomu/package.py')
-rw-r--r-- | pomu/package.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pomu/package.py b/pomu/package.py index 55ec994..7c9321e 100644 --- a/pomu/package.py +++ b/pomu/package.py @@ -14,7 +14,7 @@ from pomu.util.fs import strip_prefix from pomu.util.result import Result class Package(): - def __init__(self, backend, name, root, category=None, version=None, slot='0', d_path=None, files=None, filemap=None): + def __init__(self, name, root, backend=None, category=None, version=None, slot='0', d_path=None, files=None, filemap=None): """ Parameters: backend - specific source module object/class @@ -76,7 +76,7 @@ class Package(): wd, _ = path.split(trg) dest = path.join(dst, wd) try: - makedirs(wd, exists_ok=True) + makedirs(dest, exist_ok=True) copy2(src, dest) except PermissionError: return Result.Err('You do not have enough permissions') @@ -96,7 +96,7 @@ class Package(): stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=d) if ret.returncode != 0: - return Result.Err('Failed to generate manifest at', d) + return Result.Err('Failed to generate manifest at ' + d) if path.exists(path.join(d, 'Manifest')): res.append(path.join(d, 'Manifest')) return Result.Ok(res) |