diff options
author | 2017-07-29 05:00:02 +0300 | |
---|---|---|
committer | 2017-07-29 05:00:02 +0300 | |
commit | 9fe8451959d14d19b1436d840cc4df12774a7835 (patch) | |
tree | e1389cf17fee7ba220f7e717fdceea3542d78ded | |
parent | Multiple cli improvements (diff) | |
download | pomu-9fe8451959d14d19b1436d840cc4df12774a7835.tar.gz pomu-9fe8451959d14d19b1436d840cc4df12774a7835.tar.bz2 pomu-9fe8451959d14d19b1436d840cc4df12774a7835.zip |
Implemented package updates
documented the commit subcommand
-rw-r--r-- | pomu/cli.py | 1 | ||||
-rw-r--r-- | pomu/repo/repo.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pomu/cli.py b/pomu/cli.py index 7ccad76..13a9738 100644 --- a/pomu/cli.py +++ b/pomu/cli.py @@ -95,6 +95,7 @@ def patch(package): @main.command() @click.option('--single', is_flag=True, required=False, default=False) def commit(single): + """Commit user changes""" repo = pomu_active_repo() change_map = process_changes(repo, single).expect() diff --git a/pomu/repo/repo.py b/pomu/repo/repo.py index 4317e47..8dfe2d8 100644 --- a/pomu/repo/repo.py +++ b/pomu/repo/repo.py @@ -111,6 +111,12 @@ class Repository(): pkg = self.get_package(name).expect() return self.unmerge(pkg) + def update_package(self, category, name, new): + """Updates a package, replacing it by a newer version""" + pkg = self.get_package(category, name).expect() + self.unmerge(pkg).expect() + self.merge(new) + def _get_package(self, category, name, slot='0'): """Get an existing package (by category, name and slot), reading the manifest""" from pomu.source import dispatcher |