aboutsummaryrefslogtreecommitdiff
path: root/pomu
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-07-29 05:00:02 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-07-29 05:00:02 +0300
commit9fe8451959d14d19b1436d840cc4df12774a7835 (patch)
treee1389cf17fee7ba220f7e717fdceea3542d78ded /pomu
parentMultiple cli improvements (diff)
downloadpomu-9fe8451959d14d19b1436d840cc4df12774a7835.tar.gz
pomu-9fe8451959d14d19b1436d840cc4df12774a7835.tar.bz2
pomu-9fe8451959d14d19b1436d840cc4df12774a7835.zip
Implemented package updates
documented the commit subcommand
Diffstat (limited to 'pomu')
-rw-r--r--pomu/cli.py1
-rw-r--r--pomu/repo/repo.py6
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