diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2019-06-09 00:35:54 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2019-06-09 00:35:54 +0300 |
commit | 75b70897ff9ce7dcd6db66ee8e4d5118822a6f66 (patch) | |
tree | 86bab3286956988605a5a8633fed1fe818b8c275 /pomu/repo/repo.py | |
parent | Disabled standalone mode (diff) | |
download | pomu-75b70897ff9ce7dcd6db66ee8e4d5118822a6f66.tar.gz pomu-75b70897ff9ce7dcd6db66ee8e4d5118822a6f66.tar.bz2 pomu-75b70897ff9ce7dcd6db66ee8e4d5118822a6f66.zip |
cli: argument passing fixes
sources: fix custom names
fixed version string generation and version search
ensure import -> change -> commit workflow works
Diffstat (limited to 'pomu/repo/repo.py')
-rw-r--r-- | pomu/repo/repo.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pomu/repo/repo.py b/pomu/repo/repo.py index 8dfe2d8..98ed4ae 100644 --- a/pomu/repo/repo.py +++ b/pomu/repo/repo.py @@ -86,7 +86,7 @@ class Repository(): f.write(path.basename(patch) + '\n') if package.backend: with open(path.join(pkgdir, 'BACKEND'), 'w+') as f: - f.write('{}\n'.format(package.backend.__name__)) + f.write('{}\n'.format(package.backend.__cname__)) package.backend.write_meta(pkgdir) with open(path.join(pkgdir, 'VERSION'), 'w+') as f: f.write(package.version) @@ -145,11 +145,12 @@ class Repository(): """Get a package by name, category and slot""" with open(path.join(self.pomu_dir, 'world'), 'r') as f: for spec in f: + spec = spec.strip() cat, _, nam = spec.partition('/') nam, _, slo = nam.partition(':') if (not category or category == cat) and nam == name: if not slot or (slot == '0' and not slo) or slot == slo: - return self._get_package(category, name, slot) + return Result.Ok(self._get_package(category, name, slot or '0')) return Result.Err('Package not found') def get_packages(self): |